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:
Joshua Horton 2025-05-19 08:43:24 +07:00 • committed by GitHub
commit f499e155c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 11 deletions

View file

@ -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.

View file

@ -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.
}
}