-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Fixes autofocus does not work when the dialog has opened #24376
Conversation
* __DEV__ condition removed from update container because onScheduleRoot has already a __DEV__ condition. * Removed __DEV__ condition in catch scope.
This reverts commit 86133d4.
Comparing: 1f7a901...ba5622a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
@rickhanlonii can you review this please |
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.
The code in CommitWork is not platform-specific and shouldn't include concepts like "dialog". Can you briefly describe what you're trying to do?
My purpose focus to the element which has autoFocus prop when a dialog opens. dialog is being rendered on the first mount even if not visible. React is being looked at to elements that have autoFocus property only first mount. I look up again to children that have autoFocus property when the dialog has opened. |
Summary
Fixes #23301. Dialog elements already have been rendered when the open props value has changed.
How did you test this change?
I have tried the dispatchEvent but that can't render properly. The important point is the input element should have autoFocus={true} property before open the dialog.