Bug 478939 - listboxes should support three finger swipe up/down on Mac OS X. r=enndeakin

This commit is contained in:
Edward Lee 2009-02-20 17:16:04 -06:00
Родитель c91d74ac56
Коммит e79e6f4bdb
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

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