mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-07 22:47:29 +00:00
Merge pull request #13683 from keymanapp/fix/web/flick-cancel-during-reset
change(web): cancel flicks when both returning to and releasing at original tap location
This commit is contained in:
commit
f499e155c1
2 changed files with 4 additions and 11 deletions
|
|
@ -337,15 +337,13 @@ graph TD;
|
|||
|
||||
recenter-condition -- Yes --> flick-restart
|
||||
recenter-condition -- No + input finishes --> reject
|
||||
%% comment %% (should --> flick-reset-end)
|
||||
|
||||
subgraph Stage6[" "]
|
||||
flick-restart --> restart-move-condition
|
||||
end
|
||||
|
||||
restart-move-condition -- Yes --> flick-mid
|
||||
restart-move-condition -- No + input finishes --> flick-reset-end
|
||||
%% comment %% ... could treat as a --> reject if we wanted a semblance of cancellation...
|
||||
restart-move-condition -- No + input finishes --> reject
|
||||
```
|
||||
|
||||
Note that the early cases from 'flick-start' that lead to 'reject' are all valid inputs for gesture types handled by previously-defined FSMs.
|
||||
|
|
@ -865,14 +865,9 @@ export function flickRestartModel(params: FullGestureParams): GestureModel<KeyEl
|
|||
}
|
||||
],
|
||||
id: 'flick-restart',
|
||||
sustainWhenNested: true,
|
||||
rejectionActions: {
|
||||
// Only 'rejects' in this form if the path is completed before direction-locking state.
|
||||
path: {
|
||||
type: 'replace',
|
||||
replace: 'flick-reset-end'
|
||||
}
|
||||
},
|
||||
sustainWhenNested: true
|
||||
// Do not emit a key if we're still in the 'restart' phase; the user unlocked the flick,
|
||||
// so they want a cancel if they 'let up' in this state.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue