Description
In the Mentions example, copying and pasting a selected mention node, or cutting a selected mention node, crashes the local page. The live Slate example handles the same selected mention node normally.
I reproduced this with both @R2-D2 and @Mace Windu, so this appears to affect selected mention inline void nodes generally.
Recording
Screenshots attached below:
Local actual behavior:
Live reference expected behavior:
Video attached below:
Not required unless the screenshots are not clear enough.
Sandbox
No standalone sandbox. Reproduced in the Slate examples site.
Local reproduction URL:
http://localhost:3100/examples/mentions
Reference URL:
https://www.slatejs.org/examples/mentions
Steps
To reproduce the copy/paste crash:
- Go to
http://localhost:3100/examples/mentions.
- Click an existing mention node, such as
@R2-D2 or @Mace Windu, so that the mention is selected.
- Press
Cmd+C.
- Move the caret to another position in the editor.
- Press
Cmd+V.
Alternative cut path:
- Go to
http://localhost:3100/examples/mentions.
- Click an existing mention node, such as
@R2-D2 or @Mace Windu, so that the mention is selected.
- Press
Cmd+X.
Expectation
The selected mention node should copy/paste or cut successfully, matching the live Mentions example.
Cmd+C then Cmd+V should insert another copy of the selected mention node.
Cmd+X should remove the selected mention node from its original position.
- The page should not crash.
Actual behavior
On the local Mentions example, copying then pasting a selected mention node crashes the page with a runtime error. Cutting the selected mention node also crashes.
Observed error:
Cannot read properties of null (reading 'setAttribute')
Environment
- Local branch/commit:
v2, ce2bd6c6
- Local URL:
http://localhost:3100/examples/mentions
- Reference URL:
https://www.slatejs.org/examples/mentions
- Browser: Chrome on macOS
Impact
This breaks clipboard operations for mention inline void nodes and can crash the examples page during a normal editor copy/paste or cut workflow.
Description
In the Mentions example, copying and pasting a selected mention node, or cutting a selected mention node, crashes the local page. The live Slate example handles the same selected mention node normally.
I reproduced this with both
@R2-D2and@Mace Windu, so this appears to affect selected mention inline void nodes generally.Recording
Screenshots attached below:
Local actual behavior:
Live reference expected behavior:
Video attached below:
Not required unless the screenshots are not clear enough.
Sandbox
No standalone sandbox. Reproduced in the Slate examples site.
Local reproduction URL:
Reference URL:
Steps
To reproduce the copy/paste crash:
http://localhost:3100/examples/mentions.@R2-D2or@Mace Windu, so that the mention is selected.Cmd+C.Cmd+V.Alternative cut path:
http://localhost:3100/examples/mentions.@R2-D2or@Mace Windu, so that the mention is selected.Cmd+X.Expectation
The selected mention node should copy/paste or cut successfully, matching the live Mentions example.
Cmd+CthenCmd+Vshould insert another copy of the selected mention node.Cmd+Xshould remove the selected mention node from its original position.Actual behavior
On the local Mentions example, copying then pasting a selected mention node crashes the page with a runtime error. Cutting the selected mention node also crashes.
Observed error:
Environment
v2,ce2bd6c6http://localhost:3100/examples/mentionshttps://www.slatejs.org/examples/mentionsImpact
This breaks clipboard operations for mention inline void nodes and can crash the examples page during a normal editor copy/paste or cut workflow.