Skip to content

Commit 6f1c07b

Browse files
committed
fix(web): typing into the device preview no longer goes to the composer
Type-to-focus listens for keydown on window in the capture phase and redirects printable keys into the composer unless the target is editable or interactive. The device preview screen is role="application" and on neither list, so letters and digits never reached the emulator. Treat role="application" as interactive: the role means the widget owns the keyboard.
1 parent 8630e1a commit 6f1c07b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ const TYPE_TO_FOCUS_INTERACTIVE_SELECTOR = [
643643
'[role="radio"]',
644644
'[role="switch"]',
645645
'[role="tab"]',
646+
'[role="application"]',
646647
].join(",");
647648
// Popups match only while open or closing: some stay mounted when closed,
648649
// such as the chat header actions menu.

0 commit comments

Comments
 (0)