mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809274. Avoid setting the sidebar visibility to the same value. r=felipe
This commit is contained in:
parent
41ddfe3144
commit
37543d52c9
@ -925,7 +925,11 @@ var SocialSidebar = {
|
||||
|
||||
setSidebarVisibilityState: function(aEnabled) {
|
||||
let sbrowser = document.getElementById("social-sidebar-browser");
|
||||
sbrowser.docShell.isActive = aEnabled;
|
||||
// it's possible we'll be called twice with aEnabled=false so let's
|
||||
// just assume we may often be called with the same state.
|
||||
if (aEnabled == sbrowser.docShellIsActive)
|
||||
return;
|
||||
sbrowser.docShellIsActive = aEnabled;
|
||||
let evt = sbrowser.contentDocument.createEvent("CustomEvent");
|
||||
evt.initCustomEvent(aEnabled ? "socialFrameShow" : "socialFrameHide", true, true, {});
|
||||
sbrowser.contentDocument.documentElement.dispatchEvent(evt);
|
||||
|
Loading…
Reference in New Issue
Block a user