Voog / wysihtml

Open source rich text editor for the modern web
http://wysihtml.com
MIT License
3.36k stars 336 forks source link

Unable to delete uneditable elements using backspace or delete key #254

Open GGuru opened 8 years ago

GGuru commented 8 years ago

I am using 0.5.0

I am dynamically inserting few uneditable elements using insertNode(). I am not able to delete them using backspace or delete key. When i try to do that browser back button action is invoked, then page submits for previously visited URL. This happens only i have some uneditable elements together with some space and custom text.

This used to work very well in 0.4 versions.. I recently upgraded to 0.5.0.

GGuru commented 8 years ago

I got a workaround for chrome on this.

For the span node that I am trying to add, I removed style dipslay:inline-block. After this, I was able to delete the nodes

I didn't dive deeper but the delete happens based on a regex check of /block/ on display property inside the method fixDeleteInTheBeginnigOfHeading