Skip to content

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

Merged
sadmann7 merged 1 commit intosadmann7:mainfrom
MdTehseenKhan:fix/cursor-jumps-to-the-end-when-editing-in-the-middle-of-input
Feb 24, 2026
Merged

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

Conversation

@MdTehseenKhan
Copy link
Contributor

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.

@sadmann7
Copy link
Owner

thanks a lot.

@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tablecn Ready Ready Preview, Comment Feb 24, 2026 8:58am

Request Review

@sadmann7 sadmann7 merged commit 8252731 into sadmann7:main Feb 24, 2026
7 checks 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.

2 participants