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.

Deleting only child void node throws an exception

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What’s the current behavior?

Trying to delete an inline void node that is the only leaf throws an exception Uncaught TypeError: Cannot read property 'text' of null

This JSFiddle sets things up.

  1. Select the void node, or select after it.
  2. Hit backspace.

Browser: Chrome: Latest

kapture 2018-08-30 at 17 01 28

What’s the expected behavior?

Should be able to backspace to delete, or select and delete the void node.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ericedemcommented, Aug 31, 2018

Ok it looks like the problem above is that the “voidness” needs to be specified in the schema, rather than the data itself. I wonder if there should be a warning or error if someone tries to set isVoid. Here is a modified fiddle that works: https://jsfiddle.net/fj9dvhom/1843/

1reaction
JinJieTancommented, Aug 8, 2019

I still haven’t solved this problem. Your code hasn’t solved my problem. When I deleted the only image content of the Editor, I was prompted that I Cannot read property ‘text’ of null ,please ,help me !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.removeChild() - Web APIs - MDN Web Docs
The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.
Read more >
RemoveChild javascript, if there are no more childnodes dont ...
Hi im currently trying to delete every second column with help of the removeChild() method. If i delte all the columns, i want...
Read more >
Binary Search Trees - cs.wisc.edu
When the node to delete is a leaf, we want to remove it from the BST by setting the appropriate child pointer of...
Read more >
Deleting all nodes from QuickLaunch
This is my code to delete the QuickLaunch Navigation Nodes. I am using the SharePoint 2013. public void 2013NodeOrders(string siteUrl, string ...
Read more >
how to have a node remove itself from parent — oracle-tech
Is there an equivalent way in javafx 2.0 to have a node remove itself? ... @Override public void start(Stage stage) throws Exception {...
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