mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 985555 - Prevent creating multiple markup view iframes when browsing in history. r=bgrins
This commit is contained in:
parent
cbbee25e7e
commit
d488948063
@ -318,7 +318,13 @@ InspectorPanel.prototype = {
|
||||
this._destroyMarkup();
|
||||
this.isDirty = false;
|
||||
|
||||
this._getDefaultNodeForSelection().then(defaultNode => {
|
||||
let onNodeSelected = defaultNode => {
|
||||
// Cancel this promise resolution as a new one had
|
||||
// been queued up.
|
||||
if (this._pendingSelection != onNodeSelected) {
|
||||
return;
|
||||
}
|
||||
this._pendingSelection = null;
|
||||
this.selection.setNodeFront(defaultNode, "navigateaway");
|
||||
|
||||
this._initMarkup();
|
||||
@ -330,7 +336,9 @@ InspectorPanel.prototype = {
|
||||
this.setupSearchBox();
|
||||
this.emit("new-root");
|
||||
});
|
||||
});
|
||||
};
|
||||
this._pendingSelection = onNodeSelected;
|
||||
this._getDefaultNodeForSelection().then(onNodeSelected);
|
||||
},
|
||||
|
||||
_selectionCssSelector: null,
|
||||
|
Loading…
Reference in New Issue
Block a user