fix: remove 300ms click delay by setting click interval to 0#10388
fix: remove 300ms click delay by setting click interval to 0#10388cschanhniem wants to merge 1 commit into
Conversation
PR visgl#10323 corrected the `requestFailure` → `requireFailure` typo in the recognizer setup, which activated a 300ms delay on every click via TapRecognizer's unconditional setTimeout when `requireFailure` is set. Setting `interval: 0` on the click recognizer makes the timer fire immediately, restoring the sub-millisecond click response that existed in all versions prior to 9.3.4. Fixes visgl#10384 Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
|
To avoid more issues with this gesture handler, adding some tests would be helpful. That is, unless short term it is preferred to move these handlers into mjolnir.js thoughts? @chrisgervang |
chrisgervang
left a comment
There was a problem hiding this comment.
We can merge this to hot fix but since we're also the maintainers of mjolnir, I would like to get more context around why 300ms is the default and potentially change it to avoid this class of bug elsewhere.
|
Good call — I will add tests for the gesture handler to prevent regressions. Short term I can land those in this PR; happy to move them into mjolnir.js if thats the preferred home. |
|
Good point — I'll follow up by looking at mjolnir.js to understand why the TapRecognizer timer defaults to 300ms. If there's no semantic reason beyond 'tap is a delayed click,' we could upstream a shorter interval there so the fix applies across all consumers. |
|
Sounds good. Please ping me after you've looked into tests to merge |
PR #10323 corrected the
requestFailure→requireFailuretypo in the recognizer setup, which activated a 300ms delay on every click via TapRecognizer's unconditionalsetTimeoutwhenrequireFailureis set.Setting
interval: 0on the click recognizer makes the timer fire immediately, restoring the sub-millisecond click response that existed in all versions prior to 9.3.4.Fixes #10384