Skip to content

Commit 30da3b9

Browse files
style(web): fit the window-return focus comment in four lines
AI-assisted; verified with the tests and tools listed above.
1 parent 17cbcc1 commit 30da3b9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/web/src/components/ChatView.logic.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,10 @@ export function hasServerAcknowledgedLocalDispatch(input: {
10781078
);
10791079
}
10801080

1081-
// Returning to the window should land the caret in the composer, so the reader can type right
1082-
// away. The exceptions are places where focus is deliberate: another text field, a terminal in
1083-
// the drawer or the right panel, an open dialog, menu, or popup, a region or sidebar row
1084-
// reached from the keyboard, or a region with its own keys (aria-keyshortcuts). A plain focused button or a clicked row yields to the composer.
1081+
// Window return puts the caret in the composer unless focus is deliberate: another text field,
1082+
// a terminal, an open dialog, menu, or popup, a region or sidebar row reached from the keyboard,
1083+
// or a region with its own keys (aria-keyshortcuts). A plain focused button or a clicked row
1084+
// yields to the composer.
10851085
export function shouldRefocusComposerOnWindowFocus(
10861086
activeElement:
10871087
| (Pick<Element, "tagName" | "closest" | "getAttribute"> & { isContentEditable?: boolean })

0 commit comments

Comments
 (0)