Something went wrong while fetching comments. Please try again.
Created by: gitstart-sourcegraph
After opening Popover and selecting revision to compare on the repository comparison page the focus doesn't return to the trigger button.
Popover
which renders Input
with autoFocus
Using a keyboard, select a revision like this:
Notice that focus is lost
This happens in components with PopoverContent with text field + autoFocus inside
Focus should be returned to the trigger that opened the selector (the button)
Unable to cleanly maintain focus on RepoContainer
's Popover since useMemo
gets re-rendered (Input element's autoFocus takes the focus here) when we control open state of Popover
as in other use cases.
Check out the client app preview documentation to learn more.