Skip to content
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

Fix escape key to close IME in useOverlay #5923

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

ryo-manba
Copy link
Contributor

Closes #5921

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Open OS keyboard settings
  2. Add Chinese Pinyin - Simplified
  3. Visit http://localhost:9003/?path=/story/dialog--form&providerSwitcher-express=false&strict=true
  4. Type "ni", a set of suggestions should appear
  5. Press Tab 3x
  6. Press Escape and see the state of the dialog

🧢 Your Project:

@LFDanLu
Copy link
Member

LFDanLu commented Feb 23, 2024

GET_BUILD

@rspbot
Copy link

rspbot commented Feb 23, 2024

@rspbot
Copy link

rspbot commented Feb 23, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and confirmed that this works. For others who may test this, note that exiting the IME dropdown with ESC doesn't remove you from the composing state. You have to hit ESC again which will clear the field. This seems to be the correct behavior, I'm more used to the Windows IME dropdown which doesn't close until you hit ESC twice before closing the dropdown which then clears the field (first escape reverts to whatever raw input you had typed -> second clears and closes the dropdown) which is pretty much the same behavior except for when the dropdown closes

@LFDanLu LFDanLu merged commit 98477ac into adobe:main Feb 23, 2024
26 checks passed
@ryo-manba ryo-manba deleted the fix/overlay-escape-ime branch February 24, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useOverlay: IMEs escape key behavior not taken into account
4 participants