You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improvement(ux): submit on Enter in chip modals and advance table rows (#5781)
* improvement(ux): submit on Enter in chip modals and advance table rows
* fix(emcn): stop Enter double-submit and close registration gap
- stopPropagation on field Enter-submit so a parent onKeyDown can't re-fire the primary (double OAuth connect, etc.)
- register primary via useLayoutEffect so it's set before paint (no null-Enter window)
- drop now-redundant parent Enter handlers in connect-oauth/create-workspace/rename-document modals
* fix(table): suppress auto-opened tag dropdown when Enter advances cells
Focusing an empty cell auto-opens the tag dropdown; without closing it a follow-up Enter inserts a tag instead of navigating down the column.
* fix(table): clean up cell refs on unmount and guard Enter advance
- delete inputRefs/overlayRefs entries when a cell detaches so deleting a row can't leave stale position-keyed entries
- guard Enter advance with isConnected so a stale ref can never steal focus into a detached node
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/rename-document-modal/rename-document-modal.tsx
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -74,17 +74,10 @@ export function RenameDocumentModal({
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table/table.tsx
+38-1Lines changed: 38 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,41 @@ function TableCell({
97
97
}
98
98
}
99
99
100
+
/**
101
+
* Enter commits the current cell (values already persist on change) and
102
+
* advances to the same column in the next row, spreadsheet-style. Skipped
103
+
* while a tag/env-var dropdown is open (Enter selects an option there) or
104
+
* during IME composition. The next row already exists — it auto-appends the
105
+
* moment the last row is typed into — so focus lands on a real input.
106
+
*
107
+
* Focusing an empty cell auto-opens the tag dropdown, so the destination's
108
+
* dropdown is closed right after focusing: otherwise a follow-up Enter would
109
+
* land on that dropdown and insert a tag instead of continuing down the
110
+
* column. Clicking or typing `<` in the cell still opens it deliberately.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -69,13 +69,6 @@ export function CreateWorkspaceModal({
69
69
}
70
70
}
71
71
72
-
consthandleKeyDown=(e: React.KeyboardEvent)=>{
73
-
if(e.key==='Enter'){
74
-
e.preventDefault()
75
-
voidhandleSubmit()
76
-
}
77
-
}
78
-
79
72
consthandleNameChange=(value: string)=>{
80
73
setName(value)
81
74
setError(null)
@@ -86,7 +79,7 @@ export function CreateWorkspaceModal({
0 commit comments