Repository navigation
fix(input): throttle held delete acceleration while the editor lags - #977
Merged
Merged
Conversation
This was referenced Nov 28, 2026
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.
Holding delete in a slow editor (browsers, web editors) kept deleting after the key was released: from the 21st repeat the acceleration sends up to 21 deletes per repeat, and the editor queues what it cannot apply in time.
Change
RichInputConnection: remember the cursor the editor last reported (onUpdateSelection,initialSelStart) and exposeunappliedDeletionCount(), the chars we deleted that the editor has not applied yet.InputLogic.getBackspaceExtraDeletes: cap extra deletes so at most 21 chars are unapplied. Covers all delete paths (web key events, normal fields, composing word, no-cursor fields).Verification
InputLogicTest: 154 tests, 0 failures (1 skipped), including the existing acceleration tests and two new ones (lagging normal field, lagging web editor).Fixes #972. Related: #971 (no toggle; acceleration now stays predictable).