Bug 765390 - (Part 2) Text selection should be cleared on pagehide. r=mbrubeck

--HG--
extra : rebase_source : 19366546d05883f5d16a3e53d78bca6b8ea39d62
This commit is contained in:
Margaret Leibovic 2012-06-23 15:46:21 -07:00
parent 901ffdd12e
commit 2aa6a7905b

View File

@ -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;
}
}
};