mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 921343 - Avoid removing selections done by the user when closing the findbar. r=mikedeboer
This commit is contained in:
parent
204fba7379
commit
1bf5476c00
@ -568,7 +568,7 @@
|
||||
this.hidden = true;
|
||||
|
||||
this.browser.finder.focusContent();
|
||||
this.browser.finder.removeSelection();
|
||||
this.browser.finder.enableSelection();
|
||||
this._findField.blur();
|
||||
|
||||
this._cancelTimers();
|
||||
|
@ -102,11 +102,15 @@ Finder.prototype = {
|
||||
this._notify(Ci.nsITypeAheadFind.FIND_NOTFOUND, false, false);
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
this._fastFind.setSelectionModeAndRepaint(Ci.nsISelectionController.SELECTION_ON);
|
||||
},
|
||||
|
||||
removeSelection: function() {
|
||||
let fastFind = this._fastFind;
|
||||
|
||||
fastFind.collapseSelection();
|
||||
fastFind.setSelectionModeAndRepaint(Ci.nsISelectionController.SELECTION_ON);
|
||||
this.enableSelection();
|
||||
|
||||
this._restoreOriginalOutline();
|
||||
},
|
||||
|
@ -66,6 +66,10 @@ RemoteFinder.prototype = {
|
||||
word: aWord });
|
||||
},
|
||||
|
||||
enableSelection: function () {
|
||||
this._browser.messageManager.sendAsyncMessage("Finder:EnableSelection");
|
||||
},
|
||||
|
||||
removeSelection: function () {
|
||||
this._browser.messageManager.sendAsyncMessage("Finder:RemoveSelection");
|
||||
},
|
||||
@ -98,6 +102,7 @@ RemoteFinderListener.prototype = {
|
||||
"Finder:FastFind",
|
||||
"Finder:FindAgain",
|
||||
"Finder:Highlight",
|
||||
"Finder:EnableSelection",
|
||||
"Finder:RemoveSelection",
|
||||
"Finder:FocusContent",
|
||||
"Finder:KeyPress"
|
||||
|
Loading…
Reference in New Issue
Block a user