question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'nextSibling' of null

See original GitHub issue

We 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
  1. aaa

  2. bbb

  3. 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:open
  • Created 3 years ago
  • Reactions:4
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gammacommented, Oct 11, 2022

Is there even still activity in tinyMCE or should we look elsewhere?!

0reactions
anormal81commented, Oct 11, 2022

Another year and still no further response or bugfix 👎

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'nextSibling' of ...
The error means that the element you are looking for (with class visible ) is not existing when the code is ran. Maybe...
Read more >
Vue.js 3.0 Cannot read property 'nextSibling' of null - Get Help
I am getting the error: ' Cannot read property 'nextSibling' of null'. For every page I use the Vue.createApp(), but I think the...
Read more >
TypeError: Cannot read property 'nextSibling' of null · Issue #778
The reason it only happens when createRenderRoot is overridden is that in this case the <t-b> element's light DOM children are removed when...
Read more >
Cannot read property 'nextSibling' of null - DHTMLX Forum
I copy the dhx sample code : dhtmlxScheduler_v40\samples\06_timeline\12_section_tooltip.html,and make some modifications as following:.
Read more >
HTML | DOM nextSibling Property - GeeksforGeeks
It is a read-only property. Syntax: node.nextSibling. Return value: This property returns a next sibling of the specified node or null if ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found