From 35fa19bc95d55603bb5663e2ce5db6497ef10903 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Tue, 26 Jul 2016 14:53:32 -0400 Subject: [PATCH] Bug 1285464 - Keep focus handling in the chrome process so focus will move back to the content out of the typeahead findbar but not change which chrome window has focus. r=mikedeboer MozReview-Commit-ID: Ga8QFFgX0ZZ --HG-- extra : rebase_source : 51053e8f539e7d358bd16c36b30bb72fef2ecaa1 --- toolkit/content/widgets/findbar.xml | 3 +++ toolkit/modules/Finder.jsm | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml index f8dfe7a24e1e..a195122d843c 100644 --- a/toolkit/content/widgets/findbar.xml +++ b/toolkit/content/widgets/findbar.xml @@ -762,6 +762,9 @@ this.setAttribute("noanim", true); this.hidden = true; + // 'focusContent()' iterates over all listeners in the chrome + // process, so we need to call it from here. + this.browser.finder.focusContent(); this.browser.finder.onFindbarClose(); this._cancelTimers(); diff --git a/toolkit/modules/Finder.jsm b/toolkit/modules/Finder.jsm index d8b7035b04a5..4adb5c15a133 100644 --- a/toolkit/modules/Finder.jsm +++ b/toolkit/modules/Finder.jsm @@ -297,7 +297,6 @@ Finder.prototype = { }, onFindbarClose: function() { - this.focusContent(); this.enableSelection(); this.highlighter.highlight(false); },