Topic: WYSIWYG Error
estalis free asked 2 years ago
*Expected behavior*Not supposed to get a big error in console.
*Actual behavior*Editor works as expected but throws this error often.
Uncaught TypeError: Cannot read properties of undefined (reading 'nativeElement') at MdbWysiwygComponent._updateToolbar (mdb-angular-wysiwyg.mjs:355:47) at mdb-angular-wysiwyg.mjs:260:26 at _ZoneDelegate.invoke (zone.js:372:1) at Object.onInvoke (core.mjs:25608:1) at _ZoneDelegate.invoke (zone.js:371:1) at Zone.run (zone.js:134:1) at NgZone.run (core.mjs:25462:1) at mdb-angular-wysiwyg.mjs:259:30 at Object.next (Subscriber.js:110:1) at SafeSubscriber._next (Subscriber.js:60:1)
Resources (screenshots, code snippets etc.)
<mdb-wysiwyg formControlName="contenu"></mdb-wysiwyg>
More information : error occurs when window is resized and when we are in another page (editor not visible anymore : shouldn't it be destroyed ?)
If we don't load the component once, we never get the error.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: MDB5 2.3.0
- Device: --
- Browser: chrome
- OS: --
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 2 years ago
Thank you for reporting this problem. It looks like a listener is not removed correctly on component destroy, we will take a closer look at that and add a fix as soon as possible.