-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Popups and Tooltips steal focus from input fields #1324
Comments
This was introduced in #1154, setting focus on the Portal when opened to allow keyboard navigation. We've had other issues with this approach as well:
Given that we now also have the issue of focus stolen on open, I think it is clear that we need to nix this feature. There is no possible way to know when it is appropriate to set/restore focus to/from a Portal. If user's need focus onMount, they will have to set it manually. The use cases for this are far fewer than the use case of not wanting focus to change. TL;DRThis feature should be removed. |
The problem is, that if let's say a popup should render a component which sets focus on it's child in componentDidMount, the popup steals focus almost immediately :( At the same time onOpen and onMount popup events happen earlier that the popup content is rendered..
|
PR for the original issue coming, we'll address the additional items raised in #1326 separately. |
Released in |
Steps
Expected Result
Actual Result
Version
0.64.8
Testcase
Fork this to show the issue: http://codepen.io/levithomason/pen/ZpBaJX
The text was updated successfully, but these errors were encountered: