minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
8.01k stars 709 forks source link

Trackpad gestures are too sensitive #1138

Open mtgperales opened 4 years ago

mtgperales commented 4 years ago

Hello, by the way English is not my first language so i may jumble up some words.

It would be nice to have an option in the Preferences where i can disable similar functions to "Go Back" and "Go Forward" when using a laptop touchpad.

Steps to reproduce

Note: This issue may be or not be hardware specific or something so i don't know if i encounter this alone.

Device: Lenovo ideapad 320 OS: Manjaro 20

PalmerAL commented 4 years ago

Are you having issues with the browser going back or forwards when you don't want it to? And if so, can you describe what situations this happens in (for example, scrolling up and down, scrolling horizontally on a certain website, etc.)?

We had an option for this a while ago, so we could add it back, but I'd prefer to make the gestures work well enough that it isn't necessary.

mtgperales commented 4 years ago

Yes, i don't have a spare mouse so i heavily rely on the touchpad. It gets irritating when the current page accidentally goes back and have to forward it again.

It happens when i'm doing some fast scrolling (swiping upwards) when reading some articles. I may sometimes mess the orientation so i sometimes trigger the Go back function. Also when i'm looking up big pictures where i can navigate the whole page everywhere using touchpad, it triggers the function when the page is on the far right/left

PalmerAL commented 4 years ago

I'm going to try making the gestures less sensitive with these changes:

diff --git a/js/webviewGestures.js b/js/webviewGestures.js
index de95503..525194f 100644
--- a/js/webviewGestures.js
+++ b/js/webviewGestures.js
@@ -78,16 +78,16 @@ function resetCounters () {

 function onSwipeGestureLowVelocity () {
   // swipe to the left to go forward
-  if (horizontalMouseMove - beginningScrollRight > 150 && Math.abs(horizontalMouseMove / verticalMouseMove) > 2.5) {
-    if (beginningScrollRight < 10) {
+  if (horizontalMouseMove - beginningScrollRight > 150 && Math.abs(horizontalMouseMove / verticalMouseMove) > 3) {
+    if (beginningScrollRight < 5) {
       resetCounters()
       webviews.callAsync(tabs.getSelected(), 'goForward')
     }
   }

   // swipe to the right to go backwards
-  if (horizontalMouseMove + beginningScrollLeft < -150 && Math.abs(horizontalMouseMove / verticalMouseMove) > 2.5) {
-    if (beginningScrollLeft < 10) {
+  if (horizontalMouseMove + beginningScrollLeft < -150 && Math.abs(horizontalMouseMove / verticalMouseMove) > 3) {
+    if (beginningScrollLeft < 5) {
       resetCounters()
       webviews.goBackIgnoringRedirects(tabs.getSelected())
     }

It would be great if you could build Min and try these changes; otherwise (assuming the gestures still work reliably) I'll include them in the next release.

iambudi commented 3 years ago

I find it also iritating. It's better to give a preference option to completely disable it.

iambudi commented 3 years ago

Any update if this feature can be disabled completely 😉 ?

iambudi commented 3 years ago

Current workaround i move the swipeGestureLowVelocity inside platformZoomKey so the backward or forward page only works when pressing cmd key.

Until it gets fixed, i guess i will have to edit that part and rebuild from the source on every min release. Fortunately it does not take long :).

npm run buildMacIntel 60.23s user 8.65s system 105% cpu 1:05.00 total

Fetch1 commented 3 years ago

would be great to be able to disable this without having to rebuild from source. I feel some people may enjoy the sensitivity but it's way too much for me I'm always accidentally invoking it (It happened in writing this post).

IanDLacy commented 2 years ago

We had an option for this a while ago, so we could add it back, but I'd prefer to make the gestures work well enough that it isn't necessary.

Why do a ton of tuning when you could give the user the choice, and preferably the ability to tune it themselves also.

strindhaug commented 6 months ago

Option to disable this misfeature is really needed! I only need to scroll like less than half a centimeter off perfectly vertical to trigger it. And it ALWAYS triggers accidentally when I actually need to scroll horisontally in crappy webpages like Azure DevOps and Jira etc. that seem to always have non-responsive tables that needs scrolling to see all of it.