Skip to content

fix(input): resume the word after backspace in web editors - #937

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/web-backspace-resume
Nov 26, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/web-backspace-resume

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Problem

In browsers, type a word, press space, press backspace, then tap a suggestion: the suggestion is appended to the word (thr becomes thrthe). Possibly related: #935 (not confirmed to be the same bug).

Cause

  • Backspace outside a composing word returns early in web editors and never picks the word up again.
  • The "cursor touching a word" check reads only the local text cache, which is emptied in web editors after each commit.

Change

  • Resume suggestions after a delay (the editor handles the delete key event later; key repeat keeps postponing it).
  • When resuming, read the text from the web editor.

Side effects

Applies to all web editors: after backspace the word can become composing again, and the field is read once after the delay. Obsidian was not tested.

Verification

  • New test reproduced thrthe before the fix and passes after it.
  • InputLogicTest and ContenteditableDuplicationFixTest: no failures.
  • Tested on a phone in the Brave address bar and while editing a notebook in the browser.

https://claude.ai/code/session_017YwBxUnnx3DqiiATw5XxUk

Backspace outside a composing word returned early in web editors without
picking the word up again, so a tapped suggestion was appended to it
(space, backspace, tap "the" gave "thrthe").

Resume after a delay, since the editor handles the delete key event later.
Key repeat keeps postponing it. When resuming, read the text from the web
editor, as the local cache is emptied there after each commit.

Claude-Session: https://claude.ai/code/session_017YwBxUnnx3DqiiATw5XxUk
@LeanBitLab
LeanBitLab merged commit a3c1082 into main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant