Repository navigation
[lexical-website] Documentation Update: correct the shadow-DOM support table and two API references - #9206
Merged
Conversation
…t table and two API references
## Description
Four corrections in `concepts/shadow-dom.md`, all against the implementation
the page is documenting:
1. The support table marks Firefox "(not yet)" for
`caretPositionFromPoint({shadowRoots})`. The implementation's own note says
Chrome 128+, **Firefox 125+**, and takes that path on Firefox.
2. The legacy `getComposedRanges` form is described as "shipped by Safari 17 /
17.1". The code says Safari 17–18.1.
3. The outside-click section credits the `getComposedEventTarget` fix to
"Lexical's `LexicalMenu` and the playground's `DropDown`". `LexicalMenu`
never imports it and registers no outside-click handler — its shadow
handling is `resolveMenuParent`. The real users are the playground's
`DropDown` and `@lexical/react`'s `DraggableBlockPlugin`.
4. `@lexical/clipboard/caretFromPoint` is cited as if it were importable.
`@lexical/clipboard` exports only `"."`, and `caretFromPoint` is
`@internal`.
## Test plan
Documentation-only change (markdown is excluded from prettier via
`.prettierignore`), so the check is that each statement matches source.
### Before
```
$ grep -n "not yet\|Safari 17 / 17.1\|LexicalMenu\|@lexical/clipboard/caretFromPoint" packages/lexical-website/docs/concepts/shadow-dom.md
67:| `Document.caretPositionFromPoint({shadowRoots})` | Shadow-aware drop / drag hit-tests | 128+ | (not yet) | 18.1+ |
69:Lexical also supports the legacy variadic form of `getComposedRanges` shipped by
70:Safari 17 / 17.1, automatically choosing the dictionary or variadic call shape
296:`LexicalMenu` and the playground's `DropDown` use.
303:under the cursor. `@lexical/clipboard/caretFromPoint` switches to
$ grep -rn "getComposedEventTarget" packages/lexical-react/src/shared/LexicalMenu.tsx | wc -l
0
```
### After
```
$ sed -n '67p;69,70p;295,296p;303p' packages/lexical-website/docs/concepts/shadow-dom.md
| `Document.caretPositionFromPoint({shadowRoots})` | Shadow-aware drop / drag hit-tests | 128+ | 125+ | 18.1+ |
Lexical also supports the legacy variadic form of `getComposedRanges` shipped by
Safari 17–18.1, automatically choosing the dictionary or variadic call shape
against `getComposedEventTarget(event)` instead — the same fix the playground's
`DropDown` and `@lexical/react`'s `DraggableBlockPlugin` use.
under the cursor. `@lexical/clipboard`'s internal `caretFromPoint` helper switches to
```
Sources for each: `packages/lexical-clipboard/src/caretFromPoint.ts:102`
("Chrome 128+, Firefox 125+") and `:90` (`@internal`);
`packages/lexical/src/LexicalUtils.ts:2312` ("Safari 17–18.1");
`packages/lexical-playground/src/ui/DropDown.tsx:11,217` and
`packages/lexical-react/src/LexicalDraggableBlockPlugin.tsx:26,333`;
`packages/lexical-clipboard/package.json` `exports` (only `"."`).
potatowagon
requested review from
acywatson,
etrepum,
fantactuka,
ivailop7 and
zurfyx
as code owners
September 23, 2026 17:33
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
etrepum
approved these changes
Sep 23, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Four corrections in
concepts/shadow-dom.md, all against the implementationthe page is documenting:
caretPositionFromPoint({shadowRoots}). The implementation's own note saysChrome 128+, Firefox 125+, and takes that path on Firefox.
getComposedRangesform is described as "shipped by Safari 17 /17.1". The code says Safari 17–18.1.
getComposedEventTargetfix to"Lexical's
LexicalMenuand the playground'sDropDown".LexicalMenunever imports it and registers no outside-click handler — its shadow
handling is
resolveMenuParent. The real users are the playground'sDropDownand@lexical/react'sDraggableBlockPlugin.@lexical/clipboard/caretFromPointis cited as if it were importable.@lexical/clipboardexports only".", andcaretFromPointis@internal.Test plan
Documentation-only change (markdown is excluded from prettier via
.prettierignore), so the check is that each statement matches source.Before
After
Sources for each:
packages/lexical-clipboard/src/caretFromPoint.ts:102("Chrome 128+, Firefox 125+") and
:90(@internal);packages/lexical/src/LexicalUtils.ts:2312("Safari 17–18.1");packages/lexical-playground/src/ui/DropDown.tsx:11,217andpackages/lexical-react/src/LexicalDraggableBlockPlugin.tsx:26,333;packages/lexical-clipboard/package.jsonexports(only".").