jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Console error when removing a text with comments: Failed to execute 'appendChild' on 'Node'

Open NazarLuchyt opened this issue 1 year ago • 2 comments

Jodit Version: 4.0.6 (playground and locally)

Browser: Chrome OS: Windows Is React App: True

If the editor content includes a comment block, a console error occurs when the user removes all text.

Text for reproducing:

<!-- [if gte mso 12]>
		<style type="text/css">
			.btn{padding:10px !important;}
			.btn a{padding:0 !important;}
		</style>
	<![endif]-->
<table>
    <tbody>
        Test text hello
    </tbody>
</table>
Test text

https://github.com/xdan/jodit/assets/36989399/136723e6-65b5-4f99-914f-ab77aa553e57

Expected behavior: No console error

Actual behavior: Console error is spamming in the log

NazarLuchyt avatar Jan 24 '24 11:01 NazarLuchyt

Up This problem still exists image

NazarLuchyt avatar Mar 06 '24 11:03 NazarLuchyt

@xdan Hi! Could you please take a look at this issue? It is still reproducible. 5847.39ca5e68.chunk.js:1 Uncaught DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.

NazarLuchyt avatar Apr 11 '24 09:04 NazarLuchyt