editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

[Bug]Uncaught TypeError: Cannot read property 'parentNode' of null

Open robonetphy opened this issue 5 years ago • 3 comments

Describe a bug. When a user creates the header block and select substring of text and try to drag and put again in the same block, the user gets Uncaught TypeError: Cannot read property 'parentNode' of null on the console.

Steps to reproduce: 1.Go to editor.js sample document. (https://editorjs.io/) 2. Create a new Header Block 3. fill the block with some text 4. try to select substring of that text and drag that substring. 5.Release the text in the same block 6.You get an error 7.Caret behaves strangely after releasing that text.

Expected behaviour: You shouldn't get an error.

Screenshots: screen-capture

Device, Browser, OS: PC ,Chrome 85.0.4183.121 ,Windows 10

Editor.js version: 2.18.0

robonetphy avatar Oct 13 '20 17:10 robonetphy

Fixed with this for now onMouseOver={() => {}}

Bonjur avatar Oct 29 '20 16:10 Bonjur

where do i put that event in react-editor-js??

ghost avatar Jan 28 '21 02:01 ghost

Bug still exists

SCHJonathan avatar Aug 15 '22 05:08 SCHJonathan

where do i put that event in react-editor-js??

I encountered same issue, you should attach onMouseOver={() => {}} to the div which is used as EditorJs instance example: <div id={editorJsID} onMouseOver={() => {}} />

Sure, this solution is just a workaround, but at least it removed the error for my case

slavazoomer avatar Jun 15 '23 00:06 slavazoomer