Skip to content

Commit 98477ac

Browse files
ryo-manbaLFDanLu
andauthored
Fix escape key to close IME in useOverlay (#5923)
Co-authored-by: Daniel Lu <dl1644@gmail.com>
1 parent fa3862e commit 98477ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-aria/overlays/src/useOverlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function useOverlay(props: AriaOverlayProps, ref: RefObject<Element>): Ov
112112

113113
// Handle the escape key
114114
let onKeyDown = (e) => {
115-
if (e.key === 'Escape' && !isKeyboardDismissDisabled) {
115+
if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {
116116
e.stopPropagation();
117117
e.preventDefault();
118118
onHide();

0 commit comments

Comments
 (0)