mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 775969 - Native handles vanish when crossing. r=mbrubeck
This commit is contained in:
parent
65e1654abd
commit
5697e958fa
@ -1610,10 +1610,26 @@ var SelectionHandler = {
|
||||
}
|
||||
},
|
||||
|
||||
_ignoreCollapsedSelection: false,
|
||||
|
||||
notifySelectionChanged: function sh_notifySelectionChanged(aDoc, aSel, aReason) {
|
||||
// If the selection was removed, call endSelection() to clean up
|
||||
if (aSel == "" && aReason == Ci.nsISelectionListener.NO_REASON)
|
||||
if (aSel.isCollapsed) {
|
||||
// Bail if we're ignoring events for a collapsed selection.
|
||||
if (this._ignoreCollapsedSelection)
|
||||
return;
|
||||
|
||||
// If the selection is collapsed because of one of the mouse events we
|
||||
// sent while moving the handle, don't get rid of the selection handles.
|
||||
if (aReason & Ci.nsISelectionListener.MOUSEDOWN_REASON) {
|
||||
this._ignoreCollapsedSelection = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, we do want to end the selection.
|
||||
this.endSelection();
|
||||
}
|
||||
|
||||
this._ignoreCollapsedSelection = false;
|
||||
},
|
||||
|
||||
// aX/aY are in top-level window browser coordinates
|
||||
|
Loading…
Reference in New Issue
Block a user