selleronom / PrecisionTouchPadSwipe

Enables two-finger swipe (backwards/forwards) in Firefox for Precision Touchpads.
MIT License
8 stars 2 forks source link

The extension goes to a different page when I am scrolling an element with a horizontal overflow #12

Open artisticfox8 opened 2 years ago

artisticfox8 commented 2 years ago

Describe the bug When I scroll code comments on github.com or stackoverflow.com the extension navigates back or forward. When my mouse is inside such code comments, I simply want to scroll them horizontally, not go to a different page.

To Reproduce Steps to reproduce the behavior:

  1. Go to any page which has elements with overflow-x: auto, for example on github
  2. Try to scroll that element to see it with a touchpad
  3. Actual behaviour: page navigates

Expected behavior A clear and concise description of what you expected to happen. The extension allows horizontal scrolling on overflow-x: auto elements and doesn't call window.history.back(); Instead it only navigates back when the element.scrollLeft == 0 and only navigates forward when element.scrollLeft == element.scrollLeftMax

Desktop (please complete the following information):

artisticfox8 commented 2 years ago

I already have fixed it, will publish a PR soon

artisticfox8 commented 2 years ago

Currently, when scrolling on a input type text element, the addon navigates

selleronom commented 2 years ago

Yes, had some issues updating the add-on due to "Unsafe assignment to innerHTML on options/options.js line 5 and line 7". Are they needed?

artisticfox8 commented 2 years ago

Yes, had some issues updating the add-on due to "Unsafe assignment to innerHTML on options/options.js line 5 and line 7". Are they needed?

If the addons team has issue with that, you can swap it to innerText just fine