diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 8ec27040bc99..4996aecf723f 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -9448,7 +9448,6 @@ TabModalPromptBox.prototype = { let prompt = prompts[prompts.length - 1]; prompt.element.hidden = false; // Because we were hidden before, this won't have been possible, so do it now: - prompt.ensureXBLBindingAttached(); prompt.Dialog.setDefaultFocus(); } else { browser.removeAttribute("tabmodalPromptShowing"); diff --git a/toolkit/components/prompts/content/tabprompts.jsm b/toolkit/components/prompts/content/tabprompts.jsm index a543b1668ca1..ce5fe6c28fe2 100644 --- a/toolkit/components/prompts/content/tabprompts.jsm +++ b/toolkit/components/prompts/content/tabprompts.jsm @@ -247,20 +247,6 @@ var TabModalPrompt = class { this.onResize(); } - // Sadly this is needed to ensure all the bindings inside the - // are attached. This method had to be called by CommonDialog.jsm after - // it had set the visibility of each of the elements. - ensureXBLBindingAttached() { - for (let key in this.ui) { - if (this.ui[key] instanceof this.win.XULElement) { - if (this.ui[key].hidden) { - continue; - } - this.ui[key].clientTop; - } - } - } - shutdownPrompt() { // remove our event listeners try { diff --git a/toolkit/components/prompts/src/CommonDialog.jsm b/toolkit/components/prompts/src/CommonDialog.jsm index 32058857dfa8..8e698832cf3a 100644 --- a/toolkit/components/prompts/src/CommonDialog.jsm +++ b/toolkit/components/prompts/src/CommonDialog.jsm @@ -176,12 +176,7 @@ CommonDialog.prototype = { } if (!this.ui.promptContainer || !this.ui.promptContainer.hidden) { - // For tab prompts, we will need to ensure its content bindings are attached. - if (!xulDialog) { - this.ui.prompt.ensureXBLBindingAttached(); - } - - // Set default focus / selection. + // Set default focus and select textbox contents if applicable. this.setDefaultFocus(true); }