Bug 1340529 - Fix shown/hidden events for a devtools_panel toggled from toolbox preferences. r=kmag

MozReview-Commit-ID: H81qwCEoaf9
This commit is contained in:
Luca Greco
2017-02-16 04:07:49 +01:00
parent 7359612f21
commit 2ddaa37842
3 changed files with 65 additions and 1 deletions

View File

@@ -44,6 +44,13 @@ class ChildDevToolsPanel extends EventEmitter {
if (view.viewType === "devtools_panel" &&
view.devtoolsToolboxInfo.toolboxPanelId === this.id) {
this._panelContext = view;
// Reset the cached _panelContext property when the view is closed.
view.callOnClose({
close: () => {
this._panelContext = null;
},
});
return view;
}
}