-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Modal: Fix unexpected modal closing in IME Composition #46453
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
Conversation
8a0a42d to
a663594
Compare
| <InputControl style={ { marginBottom: '20px' } } /> | ||
|
|
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 added this so that we can check it in the storybook, is this necessary?
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.
It isn't necessary, but I think it's ok to keep around for a couple good reasons:
- It has to be tested manually (can't be put in an automated test)
- It's useful for this to be easily testable on many different platforms, since the behavior can vary between them
- It doesn't clutter the story file
|
Size Change: +16 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
mirka
left a comment
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.
Looking good! I've tested this on Mac Chrome/Safari/Firefox and it works as expected.
And thanks for adding the test!
| <InputControl style={ { marginBottom: '20px' } } /> | ||
|
|
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.
It isn't necessary, but I think it's ok to keep around for a couple good reasons:
- It has to be tested manually (can't be put in an automated test)
- It's useful for this to be easily testable on many different platforms, since the behavior can vary between them
- It doesn't clutter the story file
|
Thank you for the review, @mirka !
Okay, then I would like to merge it as is. |
Part of #45605
What?
This PR fixes unexpected modal closing in IME Composition.
Why?
In IME composition, the
escapekey is used to cancel character committing. This event is detected as a modal close action, causing unexpected modal close processing.580c94495e38743a61a44c71a3656b31.mp4
How?
Added determination of whether or not the compose is in progress, as was done with #45607 and #45626.
At the same time, I added a unit test to confirm that the modal should be closed with the
escapekey.Testing Instructions
In addition, I have confirmed that the following browsers work as expected in Windows 11:
Screenshots or screencast
997b62efd399bb8a9876bbba8d860436.mp4