Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(web): interactions from layer-shifting during gesture-event processing 🐵 #9802

Merged
merged 9 commits into from
Nov 6, 2023

Conversation

jahorton
Copy link
Contributor

@jahorton jahorton commented Oct 19, 2023

Fixes #7173. (Finally!)

One long-running feature of KeymanWeb's key input processing is that if a second tap starts before a first tap finishes, we automatically complete the first tap preemptively. This is all well-and-good for most scenarios, but there's a fun caveat to be considered - what if that first tap's key triggers a layer shift.

This was the crux of #7173, the TWo caps problem: because the second touch started on the original layer, the resulting key was determined to be from the original layer - and we had nothing built-in to adjust for this.

By waiting until the first tap fully completes processing - including the layer shift - before starting the gesture-model for the second tap, we can ensure that the second tap's key lookups are performed against the correct layer.

While this fix, as is, does ensure that the second tap acts properly for basic text output... there are still a few lingering complications to resolve - key previews / key highlighting, in particular. It's definitely possible to fix, but I have... reasons to push that off into a follow-up PR.

@keymanapp-test-bot skip

User testing will be specified on the immediate followup, #9803.


I have the rough outline for a unit test to be written, but I believe it must be triaged to later in order to prioritize feature implementation for parts not yet handled. Thus, I've created the issue #9834 to preserve that "rough outline" for future implementation.

@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Oct 19, 2023

User Test Results

Test specification and instructions

User tests are not required

Comment on lines +251 to +258
/* Future TODO:
* This should probably include "committing" the state token and items used by the subview,
* should they differ from the base source's original values.
*
* That said, this is only a 'polish' task, as we aren't actually relying on the base source
* once we've started identifying gestures. It'll likely only matter if external users
* desire to utilize the recognizer.
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: After #9803... this would mostly apply to multitaps; we may want to reverse the layer-write mechanism.

That said... I'm almost certain that we have no need to do so; it should be a low-priority task as I don't think I'll need the corrected version for multitap handling.

Base automatically changed from refactor/web/banner-gesture-integration to feature-gestures October 24, 2023 02:14
@jahorton jahorton marked this pull request as ready for review October 24, 2023 02:15
@jahorton jahorton requested a review from mcdurdin as a code owner October 24, 2023 02:15
@mcdurdin mcdurdin modified the milestones: A17S24, A17S25 Oct 27, 2023
@jahorton jahorton merged commit fd5f94b into feature-gestures Nov 6, 2023
2 checks passed
@jahorton jahorton deleted the fix/web/state-tokens-and-two-caps branch November 6, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants