Skip to content

Commit 8b04f61

Browse files
committed
fix(web): HTML renders replay dead-key shortcuts
1 parent 75ec2c1 commit 8b04f61

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/web/src/components/files/BrowserDocumentFrame.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function HtmlRenderDocument(props: {
175175
// The page reports the key and code, and a page script can report any pair,
176176
// so a key that could match another command's binding is never replayed. A
177177
// named key (Backspace, Enter) must be the shortcut's own, since some app
178-
// handlers read `event.key` directly.
178+
// handlers read `event.key` directly. A dead key matches by its code.
179179
const isShortcut = useEffectEvent(
180180
(key: NonNullable<ReturnType<typeof readHtmlRenderKeyDown>>) => {
181181
const matches = (shortcut: HtmlRenderShortcut) =>
@@ -185,6 +185,7 @@ export function HtmlRenderDocument(props: {
185185
allowed.length > 0 &&
186186
!blocked.some(matches) &&
187187
(key.key.length === 1 ||
188+
key.key === "Dead" ||
188189
allowed.some((shortcut) => shortcut.key === normalizeEventKey(key.key)))
189190
);
190191
},

0 commit comments

Comments
 (0)