keyman icon indicating copy to clipboard operation
keyman copied to clipboard

fix(web): proper gesture-match sequencing 🪠

Open jahorton opened this issue 1 year ago • 3 comments

Addresses part of #10592. Continues from #10838.

During investigation of the Android rapid-typing issues, I discovered that in some scenarios, it was possible for two or more incoming matchGesture calls (two or more gesture sources!) to be waiting on the same pendingMatchSetup promise. The intended design is that all incoming sources should be treated sequentially during the method's duration, as if it were a synchronized method from Java.

Conditions for matching a new source to a gesture should not change between the check for extending an existing gesture vs starting a new gesture. The exception: a gesture auto-complete directly triggered by the presence of the "new gesture" source, as with [in KMW] auto-completing one simple-tap when a new one begins.

These changes enforce the "intended design" mentioned above, establishing a Promise-based queue on the method's critical section.

@keymanapp-test-bot skip

jahorton avatar Feb 26 '24 05:02 jahorton

User Test Results

Test specification and instructions

User tests are not required

keymanapp-test-bot[bot] avatar Feb 26 '24 05:02 keymanapp-test-bot[bot]

Whoops, didn't realize I left this one in draft until now.

jahorton avatar Feb 27 '24 06:02 jahorton

Just threw in a change in regard to https://github.com/keymanapp/keyman/pull/10843#discussion_r1503445984, as I did the same ordering thing here originally.

jahorton avatar Feb 27 '24 06:02 jahorton

Changes in this pull request will be available for download in Keyman version 17.0.301-beta

keyman-server avatar Apr 03 '24 18:04 keyman-server