authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-09-24 21:56:54-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-24 21:56:54-07:00
log0c84b4289cc9dee9af770a823f812ea1e8bea05d
tree442d10b9a0723cc56c6162cc97fb027767d1c85d
parent4f27a8463105662ddfc834e01bca375d5124be79
signature Signed by PGP key B5690EEEBB952194

fix(web): paste after clicking away from the composer lands in it again (#13553)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

1 files changed, 7 insertions(+), 5 deletions(-)

apps/web/src/components/ChatView.tsx+7-5
...@@ -642,6 +642,8 @@ const TYPE_TO_FOCUS_INTERACTIVE_SELECTOR = [...@@ -642,6 +642,8 @@ const TYPE_TO_FOCUS_INTERACTIVE_SELECTOR = [
642 '[role="switch"]',642 '[role="switch"]',
643 '[role="tab"]',643 '[role="tab"]',
644].join(",");644].join(",");
645// Popups match only while open or closing: some stay mounted when closed,
646// such as the chat header actions menu.
645const TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR = [647const TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR = [
646 '[role="dialog"][aria-modal="true"]',648 '[role="dialog"][aria-modal="true"]',
647 '[data-slot="alert-dialog-popup"]:is([data-open],[data-ending-style])',649 '[data-slot="alert-dialog-popup"]:is([data-open],[data-ending-style])',
...@@ -649,11 +651,11 @@ const TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR = [...@@ -649,11 +651,11 @@ const TYPE_TO_FOCUS_FLOATING_LAYER_SELECTOR = [
649 '[data-slot="dialog-popup"]:is([data-open],[data-ending-style])',651 '[data-slot="dialog-popup"]:is([data-open],[data-ending-style])',
650 '[data-slot="sheet-popup"]:is([data-open],[data-ending-style])',652 '[data-slot="sheet-popup"]:is([data-open],[data-ending-style])',
651 '[data-slot="sidebar"][data-mobile="true"]:is([data-open],[data-ending-style])',653 '[data-slot="sidebar"][data-mobile="true"]:is([data-open],[data-ending-style])',
652 '[data-slot="menu-popup"]',654 '[data-slot="menu-popup"]:is([data-open],[data-ending-style])',
653 '[data-slot="select-popup"]',655 '[data-slot="select-popup"]:is([data-open],[data-ending-style])',
654 '[data-slot="popover-popup"]',656 '[data-slot="popover-popup"]:is([data-open],[data-ending-style])',
655 '[data-slot="combobox-popup"]',657 '[data-slot="combobox-popup"]:is([data-open],[data-ending-style])',
656 '[data-slot="autocomplete-popup"]',658 '[data-slot="autocomplete-popup"]:is([data-open],[data-ending-style])',
657].join(",");659].join(",");
658660
659type EnvironmentUnavailableState = {661type EnvironmentUnavailableState = {