Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,11 @@ const TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR = [
'[data-slot="dialog-popup"]:is([data-open],[data-ending-style])',
'[data-slot="sheet-popup"]:is([data-open],[data-ending-style])',
'[data-slot="sidebar"][data-mobile="true"]:is([data-open],[data-ending-style])',
'[data-slot="menu-popup"]',
'[data-slot="select-popup"]',
'[data-slot="popover-popup"]',
'[data-slot="combobox-popup"]',
'[data-slot="autocomplete-popup"]',
'[data-slot="menu-popup"]:is([data-open],[data-ending-style])',
'[data-slot="select-popup"]:is([data-open],[data-ending-style])',
'[data-slot="popover-popup"]:is([data-open],[data-ending-style])',
'[data-slot="combobox-popup"]:is([data-open],[data-ending-style])',
'[data-slot="autocomplete-popup"]:is([data-open],[data-ending-style])',
].join(",");

type EnvironmentUnavailableState = {
Expand Down
5 changes: 4 additions & 1 deletion apps/web/src/components/ComposerPromptEditorTiptap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,10 @@ function ComposerPromptEditorTiptapInner(props: ComposerPromptEditorProps) {
const focusAt = useCallback(
(nextCursor: number) => {
if (!editor) return;
editor.view.dom.focus({ preventScroll: true });
// view.focus() also writes the stored selection to the DOM. A bare DOM
// focus leaves the caret at the start when the controlled update already
// stored the target selection, so the setTextSelection below is a no-op.
editor.view.focus();
// A newer prompt is waiting to be applied (a chip was just inserted
// through the store). Reporting the editor's stale text now would
// overwrite that prompt; the pending rewrite places the caret instead.
Expand Down
16 changes: 8 additions & 8 deletions apps/web/src/components/RightPanelTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ const SURFACE_DISABLED_REASONS = {

/** Overlays that must win over the launcher's letter shortcuts. */
const LAUNCHER_SHORTCUT_BLOCKING_LAYERS = [
'[data-slot="dialog-popup"]',
'[data-slot="alert-dialog-popup"]',
'[data-slot="command-dialog-popup"]',
'[data-slot="menu-popup"]',
'[data-slot="select-popup"]',
'[data-slot="popover-popup"]',
'[data-slot="combobox-popup"]',
'[data-slot="autocomplete-popup"]',
'[data-slot="dialog-popup"]:is([data-open],[data-ending-style])',
'[data-slot="alert-dialog-popup"]:is([data-open],[data-ending-style])',
'[data-slot="command-dialog-popup"]:is([data-open],[data-ending-style])',
'[data-slot="menu-popup"]:is([data-open],[data-ending-style])',
'[data-slot="select-popup"]:is([data-open],[data-ending-style])',
'[data-slot="popover-popup"]:is([data-open],[data-ending-style])',
'[data-slot="combobox-popup"]:is([data-open],[data-ending-style])',
'[data-slot="autocomplete-popup"]:is([data-open],[data-ending-style])',
].join(",");

/** One-line unavailability hints for the empty-state rows. */
Expand Down
Loading