Skip to content

fix: update current input after click (#3045) - #3052

Open
Prachi24599 wants to merge 2 commits into
codex-team:nextfrom
Prachi24599:fix-list-backspace-cursor
Open

Prachi24599 wants to merge 2 commits into
codex-team:nextfrom
Prachi24599:fix-list-backspace-cursor

Conversation

@Prachi24599

@Prachi24599 Prachi24599 commented Nov 14, 2026 •

Copy link
Copy Markdown

Closes #3045

Summary

Fixes the cursor jumping to the wrong Checklist item when pressing Backspace after clicking between items.

Problem

When a user clicks one Checklist item, then clicks another item and presses Backspace, the cursor can jump to an incorrect item because currentInput may reference a previously focused input.

Solution

  • Added a click event handler to update the current input after the browser updates the selection.
  • Clear the cached inputs before updating currentInput.
  • Removed the click event listener when the block is destroyed to prevent event listener leaks.

Testing

  • Reproduced the issue using eight Checklist items.
  • Verified that clicking between items and pressing Backspace keeps the cursor in the correct item.
  • yarn build passed.
  • yarn lint passed with 0 errors (30 warnings).

This branch has not been deployed

No deployments
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.

Backspace in a list item jumps to a different item and deletes nothing after clicking between items of the same list block

1 participant