fix(InlineInput): focus management#1202
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-7ac8af8. |
🧪 Storybook is successfully deployed!
|
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 43f9e30. Configure here.

Note
Medium Risk
Focus and blur/commit behavior changed for a shared UI primitive; regressions could affect keyboard navigation and embedded hosts (e.g. Tabs with keyboardActivation=false).
Overview
Fixes InlineInput keyboard focus so the display ring cannot stick after edit ends, tab-away, or blur commits, and so standalone keyboard users get sensible focus return without a spurious ring.
Focus ring:
useFocusWithinnow tracks whether focus is actually inside the control (including an element-removal fallbackuseFocusRinglacked on the display span). Display-modedata-focusedrequiresisFocusVisible,isFocusWithin, and editable state; a one-shotringSuppressedhides the ring after programmatic focus restore.onBlurWithinignores spurious blurs when entering edit mode and callscommit(draft, false)on real blur so focus is not pulled back.Focus restore: After Enter/Escape (and similar edit-ends when
keyboardActivationis on), a layout effect returns focus to the root span unlessonSubmit/onCancelalready moved focus elsewhere. Submit-on-blur does not restore.Tests cover Enter commit focus return, handler-owned focus, and ring clearing when focus leaves during editing.
Reviewed by Cursor Bugbot for commit a0a459d. Bugbot is set up for automated code reviews on this repo. Configure here.