jodit / jodit-react

React wrapper for Jodit
MIT License
363 stars 120 forks source link

Why do I report a memory leak whenever I use the focus or blur editor #188

Open ludiguo opened 2 years ago

ludiguo commented 2 years ago

:8080/#/test:1 Uncaught (in promise) Event {isTrusted: true, originalEvent: Event, type: 'error', target: script, currentTarget: null, …}

xdan commented 2 years ago

Write more details about the error. How to play it?

mcdougald commented 2 years ago

I've experienced a similar error. I believe it's w.r.t ace & js-beautify.

I have a CSP policy in production that blocks the CDN urls for the two external dependencies. I render about 20 editors on the screen at a time. When the URLs are blocked I don't see the uncaught promise.

I played around with importing the beautify/ace-build package to get it working in production, and I ended up seeing this error from each editor.

I'll update if I can reproduce it again.