Skip to content

Commit c71e804

Browse files
hashseedDevtools-frontend LUCI CQ
authored andcommitted
Fix command menu when used with an IME
The Enter key is used both to confirm a selection in an IME but also to confirm a selection in the command menu. We need to distinguish this to not confirm both selections on the same Enter keyboard event. Fixed: 370332848 Change-Id: Ic0b09f8bc3b334e74c6049050edf7981776694d3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6054256 Auto-Submit: Yang Guo <yangguo@chromium.org> Reviewed-by: Nancy Li <nancyly@chromium.org> Commit-Queue: Nancy Li <nancyly@chromium.org>
1 parent c67091a commit c71e804

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

front_end/ui/legacy/components/quick_open/FilteredListWidget.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTyp
534534
let handled = false;
535535
switch (keyboardEvent.key) {
536536
case Platform.KeyboardUtilities.ENTER_KEY:
537-
this.onEnter(keyboardEvent);
537+
if (!keyboardEvent.isComposing) { // Ignore ENTER to confirm selection in an IME
538+
this.onEnter(keyboardEvent);
539+
}
538540
return;
539541
case Platform.KeyboardUtilities.TAB_KEY:
540542
if (keyboardEvent.shiftKey) {

0 commit comments

Comments
 (0)