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
Very easy to reproduce crash. Simply triple click in an area of Editable not occupied by a child element. See Context below for the lines of code that are causing it.
The bug was introduced very recently, 4/4/22, PR #4914, meant to fix issue #3871
The problem is the TRIPLE_CLICK code merged on 4/4/22, PR #4914, in slate-react/src/components/editable.tsx, line ~1503. In the case of triple clicking on the Editable component itself, the node returned from toSlateNode is the editor node, and the path returned from findPath is of zero length. The code inside the TRIPLE_CLICK conditional appears to not take into account the the node is the editor, or that the path length may be zero.
The text was updated successfully, but these errors were encountered:
Description
Very easy to reproduce crash. Simply triple click in an area of Editable not occupied by a child element. See Context below for the lines of code that are causing it.
The bug was introduced very recently, 4/4/22, PR #4914, meant to fix issue #3871
Recording
simplescreenrecorder-2022-04-07_20.35.13.mp4
Sandbox
https://codesandbox.io/s/slate-reproductions-forked-j0e6qq
Steps
To reproduce the behavior:
Expectation
Not to crash.
Environment
Context
The problem is the TRIPLE_CLICK code merged on 4/4/22, PR #4914, in slate-react/src/components/editable.tsx, line ~1503. In the case of triple clicking on the Editable component itself, the node returned from toSlateNode is the editor node, and the path returned from findPath is of zero length. The code inside the TRIPLE_CLICK conditional appears to not take into account the the node is the editor, or that the path length may be zero.
The text was updated successfully, but these errors were encountered: