зеркало из https://github.com/mozilla/gecko-dev.git
Bug 478939 - listboxes should support three finger swipe up/down on Mac OS X. r=enndeakin
This commit is contained in:
Родитель
c91d74ac56
Коммит
e79e6f4bdb
|
@ -853,6 +853,23 @@
|
|||
}
|
||||
]]>
|
||||
</handler>
|
||||
|
||||
<handler event="MozSwipeGesture">
|
||||
<![CDATA[
|
||||
// Figure out which index to show
|
||||
let targetIndex = 0;
|
||||
|
||||
// Only handle swipe gestures up and down
|
||||
switch (event.direction) {
|
||||
case event.DIRECTION_DOWN:
|
||||
targetIndex = this.itemCount - 1;
|
||||
// Fall through for actual action
|
||||
case event.DIRECTION_UP:
|
||||
this.ensureIndexIsVisible(targetIndex);
|
||||
break;
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче