Skip to content

fix(editor): prevent Safari slash command crash - #20

Merged
cdskill merged 1 commit into
mainfrom
fix/safari-slash-command-crash
Jun 25, 2026
Merged

fix(editor): prevent Safari slash command crash#20
cdskill merged 1 commit into
mainfrom
fix/safari-slash-command-crash

Conversation

@cdskill

@cdskill cdskill commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a Qalma-owned coordinate helper on the editor controller for consumer overlays.
  • Use document-position coordinates for sandbox and docs slash command placement instead of DOM Range measurement.
  • Remove the temporary marker insertion path that could crash Safari/WebKit when typing /.

Why

Safari could crash when the slash command menu tried to position itself through the DOM selection/range fallback. Moving placement through the mounted editor view's position coordinates avoids mutating the editable DOM during measurement and keeps ProseMirror internals behind a small Qalma API.

Fixes #18

Validation

  • nx test editor
  • nx test sandbox
  • nx test docs
  • tsc -p libs/editor/tsconfig.lib.json --noEmit
  • tsc -p libs/editor/tsconfig.spec.json --noEmit
  • tsc -p apps/sandbox/tsconfig.json --noEmit
  • tsc -p apps/sandbox/tsconfig.spec.json --noEmit
  • tsc -p apps/docs/tsconfig.app.json --noEmit
  • tsc -p apps/docs/tsconfig.spec.json --noEmit
  • nx lint editor
  • nx lint sandbox
  • nx lint docs
  • nx build sandbox
  • Playwright WebKit: type / in the sandbox editor, menu opens, no crash, no console errors

Route slash menu placement through controller coordinates instead of DOM Range measurement so Safari no longer crashes when the trigger is typed.
@cdskill
cdskill marked this pull request as ready for review June 25, 2026 21:38
@cdskill cdskill added the approved-test-change Human-approved change to tests, CI, or the test-change guard label Jun 25, 2026
@cdskill
cdskill merged commit cbdb763 into main Jun 25, 2026
2 of 4 checks passed
@cdskill
cdskill deleted the fix/safari-slash-command-crash branch June 25, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-test-change Human-approved change to tests, CI, or the test-change guard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox crashes in Safari when typing slash command trigger

1 participant