ngdeleito / easyGestures

A WebExtension for Firefox providing easy to learn gestures through a highly customizable pie menu
https://addons.mozilla.org/en-US/firefox/addon/easygestures-n/
10 stars 1 forks source link

Autoscrolling happens at the last clicked point, instead of at the pie menu #5

Closed gamingexpert13 closed 7 years ago

gamingexpert13 commented 8 years ago

If i click a random place on a page, then middle-click a different place (and hold to autoscroll through the pie menu), the autoscroll circle pops up at the last random place I clicked, not at the center of the pie menu. This causes random jumps to the top/bottom of the page, since it's unexpectedly scrolling way faster than it should.

Firefox 45.0.2 easyGestures N 4.12 Windows 7

Settings enabled:

Firefox settings enabled:

ngdeleito commented 8 years ago

I cannot reproduce your problem. Am I correctly assuming and understanding that your first click is done with the left mouse button, that you use a middle click to open the pie menu and that the autoscrolling control appears at the location of the first click?

ngdeleito commented 8 years ago

I am still unable to reproduce the bug as you described it, unfortunately. However, while investigating this issue I could reproduce a related problem for which a fix is included in version 4.14. Any additional feedback or insight is very much welcome. Thanks.

gamingexpert13 commented 8 years ago

Yes, actually if I click with any button (left, center, right) before holding middle-click in another area, it happens. Hmm, it's still happening in 4.14, even after disabling every other extension I have installed and restarting. I also tried resetting easyGestures settings (and turning the "autoscroll through center" option back on). I tried disabling the default autoscroll setting in Firefox options, but that disabled it within easyGestures as well... I tried changing the delay before autoscrolling through center from 100ms to 1000ms, and both still had the glitch.

Wow... I just tried changing a bunch of settings, and one of them was to change the button for activation from middle-click to left-click, and I tried middle-clicking and the default firefox autoscroll worked fine with that. Then I tried holding left-click to autoscroll through the easyGestures pie menu, and the glitch kept happening (autoscroll happening at last point clicked). But I noticed if I right-clicked and left the firefox context menu open, and then held left-click somewhere else to autoscroll through easyGestures, it actually worked correctly and autoscrolled at the point I clicked and held on. But if I then clicked and held in a different location, it would glitch again. But whenever I left the right-click context menu open before trying to autoscroll, it didn't glitch out. So it seems like something with the easygestures isn't actually clearing out of memory, so it thinks the pie menu is still in the last location you clicked, unless cleared with a page refresh or replacing with a different menu. Idk, or maybe it just can't grab the current cursor location if it's on the context menu, so it's clear and grabs the new (correct) location.

But then I tried switching the easygestures setting back from left-click to show, to middle-click. And at first I couldn't, since left clicking on the Options button in about:addons just showed the pie menu (not sure if this is supposed to happen)... But when I tried clicking quickly or clicking and holding, it managed to click Options somehow. I then switched it back from left-click to middle-click, and now it works fine...

Oops. I then changed the Activation Delay from 200ms to 100ms and the glitch is back... Hmm, changing it back to 200ms fixed it again though. Trying values in between 100 and 200 have inconsistent results. Sometimes there's a glitch at one value and sometimes there isn't... But at 200ms it never glitches.

Well now I tried closing firefox to get rid of all my open tabs, and only open this page, to see if it was an issue with running lots of tabs, but I got the same results. I then tried using 1000ms again, and the glitch was back. I tried numbers higher and lower, and even 200ms again, and I get glitches on all of them. Then when I tried again after letting it sit a while as I was writing this, it worked again (at 200ms). Changing values broke it again. I'm not sure what is causing this. I tried a different mouse, and it's still glitching (I also just remembered I had 2 mice connected, so I unplugged them and tried each individually) (at 100ms). Setting it back to 200ms fixed it again... This is so weird, sometimes the value fixes it and sometimes it doesn't. Also, If I try setting the value high (500ms or higher), sometimes I'll middle click and not hold, but it'll still eventually pop up the autoscroll (at the correct position). If I actually click and hold (in a new location) it glitches. It's like there isn't a mouseclickrelease command being sent (or whatever the actual command would be). Although everything else is working fine and not acting like my mouse button is being held down. No actually the easyGestures pie menu does show up in the correct location, it's just the autoscroll that doesn't, so it's more like firefox isn't reading a click that easygestures responds to. Because it's like easygestures recognizes a click location, shows the pie menu, then realizes you're trying to click through the center so it passes an autoscroll request to firefox, and firefox just shows it at the last place it saw a click. Or maybe easygestures is working too fast (or slow) and isn't managing to pass a click location sometimes or something. Idk.

I tried closing all other programs including antivirus and everything in my system tray, and unplugging other usb devices including my keyboard, and no change.

If I try refreshing the page and then pressing and holding middle-click before clicking anywhere else, it still autoscrolls at the last clicked place before the page refresh. If I open a website in a new tab and then press and hold middle-click before clicking anywhere else, it's like the autoscroll appears at 0x0 (0px, 0px) on the primary monitor (despite which monitor firefox is on). But it's more like it has no position, since I would assume if you clicked at 0x0, that's where the center of the autoscroll circle would appear, but that's not what's happening. I've attached 2 screenshots as examples:

Autoscrolling in new tab on monitor 1 (right monitor): Autoscrolling in new tab on monitor 1 (right monitor)

Autoscrolling in new tab on monitor 2 (left monitor): Autoscrolling in new tab on monitor 2 (left monitor)

ngdeleito commented 8 years ago

Thanks! I realize I can reproduce the issue on this GitHub website (but this is the only website so far). I'll look into it in the coming days and weeks...

ngdeleito commented 8 years ago

Very weirdly, after writing yesterday's comment I could reproduce the issue on any website. Anyhow, I just pushed a fix for it. Hope it fully solves the problem. If not, feel of course free to further comment.

gamingexpert13 commented 7 years ago

I still only see Version 4.14 (Last Updated: July 14, 2016) on the mozilla addon website. I tried to install the version from github, but I guess normal firefox doesn't allow unsigned extensions even with the xpinstall.signatures.required setting turned to false (unless it requires a restart or something).

ngdeleito commented 7 years ago

Indeed, since I have not yet published a new version you need to use the version on GitHub. For it to work you need for example to try it on Firefox Developer Edition, which you can get here: https://www.mozilla.org/en-US/firefox/developer/, and then make sure that the "xpinstall.signatures.required" preference is "false".