Skip to content

[lexical-website] Documentation Update: correct the shadow-DOM support table and two API references - #9206

Merged
etrepum merged 1 commit into
meta:mainfrom
potatowagon:docs-shadow-dom-support-table
Sep 23, 2026
Merged

etrepum merged 1 commit into
meta:mainfrom
potatowagon:docs-shadow-dom-support-table

Conversation

@potatowagon

Copy link
Copy Markdown
Contributor

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 ".").

…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 `"."`).
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Sep 23, 2026 5:35pm UTC
lexical-playground Ready Ready Preview Sep 23, 2026 5:35pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2026
@etrepum
etrepum added this pull request to the merge queue Sep 23, 2026
Merged via the queue into meta:main with commit d0f8ea5 Sep 23, 2026
42 checks passed
@etrepum etrepum mentioned this pull request Sep 28, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 27d41ecd Deployed Sep 23, 2026 by vercel[bot]
Preview – lexical-playground — 27d41ecd Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants