Cannot read property 'nextSibling' of null
See original GitHub issueWe get an exception when removing content in lists that contain line breaks
Reproduced with TinyMCE 5.2.2 and 5.6.1:
- Create a numbered list with 3 entries. Each one with a line break at the end (shift + enter)
- Result will look like
- aaa
- bbb
- ccc
- Start a selection with the mouse from the end of
bbb
(excluding the line break) up to the start of the first list entry - Press DEL to delete the selected content
- two list entries remain. the first one will have the line break still there
- Press DEL to remove the empty line
- Press DEL to remove the current empty list entry
- Result: Exception (See console) and the first ‘c’ of
ccc
is removed
http://fiddle.tiny.cloud/X1haab/1
Exception:
plugin.min.js:2 Uncaught TypeError: Cannot read property 'nextSibling' of null
at Gn (plugin.min.js:2)
at plugin.min.js:2
at Object.ignore (tinymce.min.js:2)
at Object.ignore (tinymce.min.js:2)
at Object.transact (tinymce.min.js:2)
at Object.transact (tinymce.min.js:2)
at ct (plugin.min.js:2)
at ft (plugin.min.js:2)
at VE.<anonymous> (plugin.min.js:2)
at dE.fire (tinymce.min.js:2)
When selecting from the end of the second list entry to the start of the first list entry, removing the content, empty line and empty entry, no exception should occur.
The behaviour is different when including the line break in the selection.
Reproduced with TinyMCE 5.2.2 and 5.6.1 and also tinymce5-cloud-stable at http://fiddle.tiny.cloud/ Browser: Google Chrome Version 87.0.4280.88 on Windows 10 Pro 20H2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top GitHub Comments
Is there even still activity in tinyMCE or should we look elsewhere?!
Another year and still no further response or bugfix 👎