mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Bug 765390 - (Part 2) Text selection should be cleared on pagehide. r=mbrubeck
--HG-- extra : rebase_source : 19366546d05883f5d16a3e53d78bca6b8ea39d62
This commit is contained in:
parent
901ffdd12e
commit
2aa6a7905b
@ -1699,6 +1699,8 @@ var SelectionHandler = {
|
||||
|
||||
this._start.addEventListener("touchstart", this, true);
|
||||
this._end.addEventListener("touchstart", this, true);
|
||||
|
||||
this._view.addEventListener("pagehide", this, false);
|
||||
},
|
||||
|
||||
hideHandles: function sh_hideHandles() {
|
||||
@ -1716,6 +1718,8 @@ var SelectionHandler = {
|
||||
|
||||
this._start = null;
|
||||
this._end = null;
|
||||
|
||||
this._view.removeEventListener("pagehide", this, false);
|
||||
},
|
||||
|
||||
_touchId: null,
|
||||
@ -1759,6 +1763,10 @@ var SelectionHandler = {
|
||||
this.moveSelection(isStartHandle, touch.clientX - this._touchDelta.x,
|
||||
touch.clientY - this._touchDelta.y);
|
||||
break;
|
||||
|
||||
case "pagehide":
|
||||
this.endSelection(0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user