fix(web): interactions from layer-shifting during gesture-event processing 🐵#9802
Merged
jahorton merged 9 commits intofeature-gesturesfrom Nov 6, 2023
Merged
Conversation
User Test ResultsTest specification and instructions User tests are not required |
jahorton
commented
Oct 19, 2023
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. | ||
| */ |
Contributor
Author
There was a problem hiding this comment.
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.
…to fix/web/state-tokens-and-two-caps
Base automatically changed from
refactor/web/banner-gesture-integration
to
feature-gestures
October 24, 2023 02:14
mcdurdin
approved these changes
Oct 24, 2023
ermshiperete
reviewed
Nov 3, 2023
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.