[menu][select] Prevent activation during exit transition#48347
[menu][select] Prevent activation during exit transition#48347mj12albert wants to merge 1 commit into
Conversation
Deploy previewhttps://deploy-preview-48347--material-ui.netlify.app/ Bundle size
Check out the code infra dashboard for more information about this PR. |
7097d74 to
a8bfd43
Compare
7e91fc0 to
e774355
Compare
siriwatknp
left a comment
There was a problem hiding this comment.
I want to be very careful on fixes like this.
To me, the issue is a very edge case without upvotes.
Introducing the pointer events none could introduce a different bug that we could not know on the user land.
In my opinion, we could:
- provide the workaround via theming, exactly like the fix you propose and close the issue as
not planned - wait for @silviuaavram opinion
This was also my first impression of the issue, but it's very easily reproducible by a fast/accidental/sloppy click Autocomplete already added this: material-ui/packages/mui-material/src/Autocomplete/Autocomplete.js Lines 616 to 619 in afc6067 IMO this is a safe change because it's guarded by the popup's |
e774355 to
5896c2d
Compare
|
I agree this is really edge case. Looking at the autocomplete change, it's not clear to me if it's for the same thing. The issues linked in the PR seem different, unless I'm mistaken. |
The fix in #48327 for #36304 applies CSS The issue with autocomplete is similar but broader than menu/select – autocomplete options incorrectly unmounted before the exit transition finishes, so the fix there persisted them until the transition finished (doesn't happen here); and then same as this PR, added CSS |
Set set
pointer-events: nonewhen closed so they can't be accidentally activated during the exit transitionFixes #27992