Skip to content

Comments

fix: cursor jumps to the end when editing in the middle#1112

Open
MdTehseenKhan wants to merge 1 commit intosadmann7:mainfrom
MdTehseenKhan:fix/cursor-jumps-to-the-end-when-editing-in-the-middle-of-input
Open

fix: cursor jumps to the end when editing in the middle#1112
MdTehseenKhan wants to merge 1 commit intosadmann7:mainfrom
MdTehseenKhan:fix/cursor-jumps-to-the-end-when-editing-in-the-middle-of-input

Conversation

@MdTehseenKhan
Copy link

Fix: Cursor jumps to the end when editing in the middle

This PR fixes cursor jumping to the end when editing in the middle of ShortTextCell and UrlCell. The focus/selection effect now runs only when entering edit mode (isEditing && !wasEditing) using a prevIsEditingRef, instead of on every value change, so the caret stays in place while typing.

Related Issue: [bug]: Cursor jumps to the end when editing in the middle

Additional Information

TableCN_Fixed.mp4

…rlCell

- Introduced a ref to track previous editing state to ensure focus is only applied when entering edit mode.
- Updated React useEffect logic to prevent unnecessary focus calls when already in editing mode.
@vercel
Copy link

vercel bot commented Feb 21, 2026

@MdTehseenKhan is attempting to deploy a commit to the sadmann7 Team on Vercel.

A member of the Team first needs to authorize it.

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