Skip to content

Commit 35829de

Browse files
t3dotggclaude
andcommitted
chore(web): selection guard checks both ends; comment covers remote links
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 35a078d commit 35829de

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/web/src/components/chat/OpenInPickerShortcut.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function useOpenFavoriteEditorShortcut({
6161
remote.mode === "local-exec" ? availableEditors : remoteCapableEditors,
6262
);
6363

64-
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes a window keydown listener for the open-in-editor shortcut while enabled locally
64+
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes a window keydown listener for the open-in-editor shortcut while enabled
6565
useEffect(() => {
6666
if (!enabled || remote.mode === "remote-unavailable") return;
6767
const handler = (event: globalThis.KeyboardEvent) => {

‎apps/web/src/components/chat/ThreadDetailsPanel.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
135135
target.closest("input, textarea, [contenteditable], a[href]") ||
136136
(selection &&
137137
!selection.isCollapsed &&
138-
event.currentTarget.contains(selection.anchorNode))
138+
(event.currentTarget.contains(selection.anchorNode) ||
139+
event.currentTarget.contains(selection.focusNode)))
139140
)
140141
return;
141142
event.preventDefault();

0 commit comments

Comments
 (0)