[ENG-1316] Fix focus when select node with keyboard flow#806
[ENG-1316] Fix focus when select node with keyboard flow#806trangdoan982 wants to merge 8 commits intomainfrom
Conversation
…Enter selection - Add autoFocus to content input field to focus on dialog open - Refocus input after selection to maintain keyboard workflow - Prevents focus from jumping to Node Type dropdown unexpectedly Fixes ENG-1316 Co-authored-by: doantranghp2000 <doantranghp2000@gmail.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
I'd love to see if we could achieve this result without an additional useEffect or keyup listener. Let's try to use the built in features of the components first and useEffect as a last resort.
Did you try setting autoFocus false on the <Label> containing the dropdown and the confirm <Button>? Specifically, managing the value of autoFocus depending on the state, eg:
- if no content, focus on content
- if no source, focus on source
- if content+source, focus on confirm
Again, via autoFocus
It looks like there is a merge conflict now from #788
Could you give this a try after fixing the merge conflict, with a short timebox (30 min).
https://www.loom.com/share/e59fb5d8593e466aa07886daa193b4a0