Bug 820436 - Buttons are unresponsive after previously closing the Developer Tools Window; r=paul

This commit is contained in:
Joe Walker 2013-01-04 20:31:38 +00:00
Родитель 5c84bd2eb8
Коммит d58782e82b
1 изменённых файлов: 4 добавлений и 7 удалений

Просмотреть файл

@ -260,7 +260,7 @@ Toolbox.prototype = {
this._buildDockButtons(); this._buildDockButtons();
this._buildTabs(); this._buildTabs();
this._buildButtons(this.frame); this._buildButtons();
this.selectTool(this._defaultToolId).then(function(panel) { this.selectTool(this._defaultToolId).then(function(panel) {
this.emit("ready"); this.emit("ready");
@ -322,17 +322,14 @@ Toolbox.prototype = {
/** /**
* Add buttons to the UI as specified in the devtools.window.toolbarSpec pref * Add buttons to the UI as specified in the devtools.window.toolbarSpec pref
*
* @param {iframe} frame
* The iframe to contain the buttons
*/ */
_buildButtons: function TBOX_buildButtons(frame) { _buildButtons: function TBOX_buildButtons() {
if (this.target.isRemote) { if (!this.target.isLocalTab) {
return; return;
} }
let toolbarSpec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec"); let toolbarSpec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec");
let environment = { chromeDocument: frame.ownerDocument }; let environment = { chromeDocument: this.target.tab.ownerDocument };
let requisition = new Requisition(environment); let requisition = new Requisition(environment);
let buttons = CommandUtils.createButtons(toolbarSpec, this._target, this.doc, requisition); let buttons = CommandUtils.createButtons(toolbarSpec, this._target, this.doc, requisition);