mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1137238 - Fix toolboxes when switching between apps in WebIDE. r=jryans
This commit is contained in:
parent
ccd2fd16cc
commit
dade31edcc
@ -927,8 +927,10 @@ let UI = {
|
||||
// We can't know for sure which one was used here, so reset the
|
||||
// |toolboxPromise| since someone must be destroying it to reach here,
|
||||
// and call our own close method.
|
||||
this.toolboxPromise = null;
|
||||
this._closeToolboxUI();
|
||||
if (this.toolboxIframe && this.toolboxIframe.uid == json.uid) {
|
||||
this.toolboxPromise = null;
|
||||
this._closeToolboxUI();
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch(e) { console.error(e); }
|
||||
@ -966,9 +968,13 @@ let UI = {
|
||||
let iframe = document.createElement("iframe");
|
||||
iframe.id = "toolbox";
|
||||
|
||||
// Compute a uid on the iframe in order to identify toolbox iframe
|
||||
// when receiving toolbox-close event
|
||||
iframe.uid = new Date().getTime();
|
||||
|
||||
document.querySelector("notificationbox").insertBefore(iframe, splitter.nextSibling);
|
||||
let host = devtools.Toolbox.HostType.CUSTOM;
|
||||
let options = { customIframe: iframe, zoom: false };
|
||||
let options = { customIframe: iframe, zoom: false, uid: iframe.uid };
|
||||
this.toolboxIframe = iframe;
|
||||
|
||||
let height = Services.prefs.getIntPref("devtools.toolbox.footer.height");
|
||||
|
Loading…
Reference in New Issue
Block a user