Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: focus stealing on render of Menu Trigger button #4970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
fix: focus stealing on render of Menu Trigger button #4970
Changes from all commits
4211161File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check failure on line 367 in src/components/Menu/Menu.tsx
Check failure on line 368 in src/components/Menu/Menu.tsx
Check failure on line 370 in src/components/Menu/Menu.tsx
Check failure on line 372 in src/components/Menu/Menu.tsx
Check failure on line 373 in src/components/Menu/Menu.tsx
Check failure on line 374 in src/components/Menu/Menu.tsx
Check failure on line 375 in src/components/Menu/Menu.tsx
Check failure on line 376 in src/components/Menu/Menu.tsx
Check failure on line 377 in src/components/Menu/Menu.tsx
Check failure on line 378 in src/components/Menu/Menu.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on a quick open and close, the focus could be lost:
hideandshowanimation callbacks runprevRendered.currentis read beforehidestarts and stops the animation, it won't reflect the change toprevRendered.current = truein theshowcallback, using old value forshowwe should check for
finishedin the animation callbacks to avoid changing focus when animation is interrupted.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on the AI review regarding the +quick open and close+.
I currently don't have any bandwidth to update this PR, but I left "edits allowed from maintainers" checked, so someone can take it over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the animation is interrupted, the callback should not run. If the callback still runs on an interrupted animation, that's a separate bug unrelated to this PR and should be solved in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this one for someone at the company who can take over this PR. It's impossible to run this repository on my windows machine, so cannot run the tests locally nor develop.
Uh oh!
There was an error while loading. Please reload this page.