utubo / firefox-simple_gesture

🦊An add-on that adds simple touch gestures for Firfox for Android. Sorry, I only check issues sometimes.
https://addons.mozilla.org/ja/firefox/addon/simple-gesture/
Other
32 stars 1 forks source link

Support double-tap ? #69

Closed OhSoGood closed 1 year ago

OhSoGood commented 1 year ago

Hi Do you think your addon could support double-tap (for me, to scroll down one page)?

I know double-tap on a word by default select a word and open the context menu. I would like to be able to double-tap anywhere else (or maybe even on a text) and to make that scroll down, in an alternative to swipe down one page.

utubo commented 1 year ago

Firefox for android may not prevent the default behavior. I will look into this more.

test code


/** @name Enable double tap to page down */
addEventListener('dblclick', function(e) {
  e.preventDefault();
  e.stopImmediatePropagation();
  e.stopPropagation();
  scrollByPages(1, {behavior:'smooth'});
  return false;
}, {passive:false, capture:true});
utubo commented 1 year ago

Version 3.2 now supports double-tap ! thank you.