Page MenuHomePhabricator

sort out MacOS keystroke bug
Closed, ResolvedPublic

Description

This is already covered partially but there are still problems, from enwiki:

I've been running into an issue where, if a user has had a level 4 warning and the pop-up asks if I want to report, whatever edit comes next in the queue is automatically reverted and the user warned when I either click "report" or dismiss the pop-up. I've noticed this happening for some time, but you can see where it just happened here after I reverted this edit and dismissed the pop-up. GorillaWarfare (talk) 02:24, 28 November 2018 (UTC)

My response:

There is a keyboard bug, probably in Qt, which results in key press event being sent multiple times on press of any key, so for example when you press R for revert, the event is triggered for 1 up to 4 times instead of just once (like if you pressed R 3 times for example) the amount of "fake" key presses is random. This is a very annoying bug that happens on MacOS only, for which I created a workaround involving check of delay between individual key-press events, which is currently set to less than 1 second. The reason for this bug is probably that when you press R to revert, Qt's keyboard subsystem again (for unknown reasons) generates N key presses, calls the Huggle's keypress event (which remembers last time when it was triggered), then display a popup message which freezes the event queue and after you answer the popup (which probably takes longer than the safety delay check is set for - less than a second) it dispatches remaining fake keypresses to Huggle, which executes revert of next edit (in theory it could be more than 1 edit). Workaround would be to use mouse to revert, mouse clicks don't suffer from this nasty bug. I hope that in future Qt versions this bug is fixed, but I am afraid it's not. If you start Huggle in verbose mode (paramter -v) you will see messages like "Keystroke bug on <integer> span <integer>" which is informing you that bug was triggered and Huggle ignored consecutive keypresses.

Related Objects

StatusSubtypeAssignedTask
ResolvedPetrb
ResolvedPetrb