Bug 1280525 - Search highlight (Ctrl + F) does not work properly when text is erased. r=mdeboer
authorJoseph Yeh <jyeh@mozilla.com>
Tue, 05 Jul 2016 00:40:00 +0200
changeset 304080 eb47026cced740ad7f3e172084f214daf121d865
parent 304079 fd418bb18d5cca614449dda0b9f673a2453f60bd
child 304081 36ec61dae09a7af35ce38d12acc17376b8ecefed
push id30411
push userkwierso@gmail.com
push dateFri, 08 Jul 2016 00:26:45 +0000
treeherdermozilla-central@23dc78b7b57e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmdeboer
bugs1280525
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1280525 - Search highlight (Ctrl + F) does not work properly when text is erased. r=mdeboer MozReview-Commit-ID: LDpP2EGTRbG
toolkit/modules/FinderHighlighter.jsm
--- a/toolkit/modules/FinderHighlighter.jsm
+++ b/toolkit/modules/FinderHighlighter.jsm
@@ -195,16 +195,17 @@ FinderHighlighter.prototype = {
         this.highlightRange(range, controller, finderWindow);
         found = true;
       });
     } else {
       // First, attempt to remove highlighting from main document
       let sel = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
       sel.removeAllRanges();
 
+      this.hide();
       this.clear();
 
       // Next, check our editor cache, for editors belonging to this
       // document
       if (this._editors) {
         for (let x = this._editors.length - 1; x >= 0; --x) {
           if (this._editors[x].document == doc) {
             sel = this._editors[x].selectionController