Open corbanbrook opened 8 years ago
Thanks for the report. There might be some deletion management missing from the TeX example.
I was thinking that #56 would be a fix for this, but I think it's not complete -- we want find the right place to move the cursor to as well.
Thanks for the details, by the way. Super useful.
This bug still exists in 0.7.0. Is there any workaround for it?
I got related problem but I can't reproduce corbanbrook 's way. Anyway, this is because the editor sometimes set entity offset to wrong location. As a temporary expedient, I'm going to insert a space intoto the missing entity range when the error found.
I ran into this bug on my own editor while working with custom blocks but it can also be reproduced on the TeX example.
When attempting to delete/backspace a custom block it will fail if your cursor position is on an unstyled empty text block. When adding custom blocks the tex example places unstyled empty text blocks after each media block so that you can continue adding more text content after.
Deleting these custom blocks from an empty block will work if the custom block is the last block but if you place your cursor on the empty unstyled text block between two custom blocks it will fail when backspacing. If the unstyled block contains text it will work correctly.
Steps to Reproduce
Expected result: The first TeX block should be removed.
Actual result: Cursor moves to top-right corner of screen and throws the error:
Fails in getPointForNonTextNode()
Pressly delete again will then trigger another error:
Pressing delete a third time will remove the block.
Reproduced in Chrome 48.0.2564.116 and Firefox 44.0.2 on OS X Yosemite 10.10.5