Skip to content

The open-source app everyone uses to manage agents at work

fix(ui): prevent IME composition Enter from moving focus in new issue title

Ken Shimizu426b16987a3d
diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx
index 9a9076bcda..79adf8888d 100644
--- a/ui/src/components/NewIssueDialog.tsx
+++ b/ui/src/components/NewIssueDialog.tsx
@@ -681,7 +681,12 @@ export function NewIssueDialog() {
e.target.style.height = `${e.target.scrollHeight}px`;
}}
onKeyDown={(e) => {
- if (e.key === "Enter" && !e.metaKey && !e.ctrlKey) {
+ if (
+ e.key === "Enter" &&
+ !e.metaKey &&
+ !e.ctrlKey &&
+ !e.nativeEvent.isComposing
+ ) {
e.preventDefault();
descriptionEditorRef.current?.focus();
}