зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373714 - Support touch-dragging the scrollthumb in XUL tree widgets. r=dao
MozReview-Commit-ID: Jcf3cXJvTJ2 --HG-- extra : rebase_source : b429c96aa7af40b128434d31417a25bc90b5d030
This commit is contained in:
Родитель
9e515dc3c7
Коммит
7efba61aa8
|
@ -685,12 +685,19 @@
|
|||
<handlers>
|
||||
<handler event="touchstart">
|
||||
<![CDATA[
|
||||
if (event.touches.length > 1) {
|
||||
function isScrollbarElement(target) {
|
||||
return (target.localName == "thumb" || target.localName == "slider")
|
||||
&& target.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
}
|
||||
if (event.touches.length > 1 || isScrollbarElement(event.touches[0].target)) {
|
||||
// Multiple touch points detected, abort. In particular this aborts
|
||||
// the panning gesture when the user puts a second finger down after
|
||||
// already panning with one finger. Aborting at this point prevents
|
||||
// the pan gesture from being resumed until all fingers are lifted
|
||||
// (as opposed to when the user is back down to one finger).
|
||||
// Additionally, if the user lands on the scrollbar don't use this
|
||||
// code for scrolling, instead allow gecko to handle scrollbar
|
||||
// interaction normally.
|
||||
this._touchY = -1;
|
||||
} else {
|
||||
this._touchY = event.touches[0].screenY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче