Bug 1257178 - Prevent "this._input is undefined" exception when developer toolbar is hidden early. r=jwalker

This commit is contained in:
Alexandre Poirot 2016-03-29 06:28:17 -07:00
parent 44071a319a
commit 4025088fcd

View File

@ -504,6 +504,10 @@ DeveloperToolbar.prototype.show = function(focus) {
// If the toolbar was just inserted, the <textbox> may still have
// its binding in process of being applied and not be focusable yet
let waitForBinding = () => {
// Bail out if the toolbar has been destroyed in the meantime
if (!this._input) {
return;
}
// mInputField is a xbl field of <xul:textbox>
if (typeof this._input.mInputField != "undefined") {
this._input.focus();