You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
On IOS, toDOMRange can call domRange.setStart with an invalid offset. This is caused by a conditional rendering of '\uFEFF' that gets excluded on IOS.
Description
On IOS,
toDOMRange
can calldomRange.setStart
with an invalid offset. This is caused by a conditional rendering of'\uFEFF'
that gets excluded on IOS.slate/packages/slate-react/src/components/string.tsx
Line 132 in 49ba21a
A later call to
toDOMRange
can fail due to passing1
as the offset to a textnode that has a zero length string.slate/packages/slate-dom/src/plugin/dom-editor.ts
Line 664 in 49ba21a
Expectation
toDOMRange
should check for conditions that don't render the\uFEFF
character and pass0
instead of1
todomRange.setStart
in such cases.Note that this is happening in a new SolidJS based package, so I don't have reproduction steps in
slate-react
, but the DOM looks like this:Environment
The text was updated successfully, but these errors were encountered: