Closed cherniavskii closed 7 years ago
I'm testing locally, branch v1-beta
(01b799a4fd6190ae97f8b529a97a982187891362
).
I modified Selects
demo page and wrapped Select
in a Dialog
. Docs are running locally (by npm docs:dev
).
It looks like focus doesn't go back to Select
after selecting an option.
Also tested keyboard control (#8229) and it is fixed.
I confirm
@cherniavskii Thanks for trying out the first fix. I have done a second iteration and added a test accordingly. We should be good :).
@oliviertassinari I confirm, it is fixed. Thank you! ;)
Another bug InputLabel in FormControl falls down at the opening https://codesandbox.io/s/rj8505o06n Material-UI -- 1.0.0-beta.16
@natash5468 Thanks for sharing the reproduction. I'm gonna have a look at it.
Hi.
I'm using beta.17 and It seems like it's not fixed. Selects inside dialog won't call onBlur or onClose when option list closes or loses focus.
@Paumonsu Do you want to open a new issue with a reproduction example (with the latest beta version) :)?
Sorry, I'm using beta.30 not .17. I'll attach a test later :).
Ok. I've prepared the test, I forked @cherniavskii test for commodity, updated it's material-ui version and added a console log on the following Select events: -onFocus -onBlur -onOpen -onClose
https://codesandbox.io/s/jnn8jnrzp3
Only onFocus is being called correctly.
I am having exactly the same issue. onOpen and onClose are never triggered.
Expected Behavior
When picking an option from
Select
and then clicking outside the select container,Select
looses focus.Current Behavior
When picking an option from
Select
and then clicking outside the select container,Select
stays focused.Steps to Reproduce (for bugs)
https://codesandbox.io/s/m3xknnr4m8
Context
Problem appears, when `Select` without `native` option is inside of a `Popover` or other component, which uses `Popover` under the hood (e.g. `Dialog`). I'm pretty sure, that's because `Select` renders its own `Popover` for options list (it uses `Menu`, which uses `Popover` under the hood) and `Dialog` also has its own `Popover`. This explains, why `Select` works fine outside a `Popover`, and why `Select` with `native` option also [works fine](https://codesandbox.io/s/v3rk31mlx5) (in both cases there's only on `Popover` visible at the same time). Any thoughts on that? I tried to debug that, but at some point I stuck. I would appreciate any help or a feedback. ## Your Environment