Repository navigation
Conversation
Safari can dispatch trusted keydown events (autofill, dictation) with event.key unset. The handlers that read event.key.length now no-op instead of throwing. Fixes TypeCellOS#3302 Co-authored-by: Rahul Kashyap <itisrmk@users.noreply.github.com>
|
@cursoragent is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Hi! Could a maintainer approve the CI workflows for this PR when you have a moment? Thanks. |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
Summary
Safari dispatches trusted
keydownevents (autofill, dictation, and similar) whosekeyisundefined. Three@blocknote/corehandlers readevent.key.lengthon those events and throwTypeError.keyboardEventKeyreturnsundefinedwhenkeyis not a string.InlineContentBoundaryEdit,NodeSelectionKeyboard, andSourceBlockWithPreviewno-op in that case, without preventing the event. Inserted text still arrives throughbeforeinput.This does not overlap with #3299 (node-view / mobile editing).
Fixes #3302
Test plan
pnpm exec vp test --run src/extensions/InlineContentBoundaryEdit/undefinedEventKey.test.ts src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboard.test.tsInlineContentBoundaryEditSummary by CodeRabbit