Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot navigate out of component I initialized Summernote in angular 9 #110

Open
D-Gr3at opened this issue Jan 2, 2021 · 1 comment
Open

Comments

@D-Gr3at
Copy link

D-Gr3at commented Jan 2, 2021

Hello everyone,
I have this in my html template:

<div class="my-3" [ngxSummernote]="config"></div>

and this in my typescript class:

config = { placeholder: 'Description here', tabsize: 2, height: '200px', toolbar: [ ['misc', ['codeview', 'undo', 'redo']], ['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']], ['fontsize', ['fontname', 'fontsize', 'color']], ['para', ['style', 'ul', 'ol', 'paragraph', 'height']], ], fontNames: ['Helvetica', 'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Roboto', 'Times New Roman'] };

whenever I click the browser back button or try to navigate from the component I get this error in my browser console and the navigation fails:

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'off' of undefined
TypeError: Cannot read property 'off' of undefined
at NgxSummernoteDirective.destroyEditor (ngx-summernote.js:413)
at NgxSummernoteDirective.ngOnDestroy (ngx-summernote.js:171)
at executeOnDestroys (core.js:14459)
at cleanUpView (core.js:14358)
at destroyViewTree (core.js:14122)
at destroyLView (core.js:14309)
at RootViewRef.destroy (core.js:15174)
at ComponentRef$1.destroy (core.js:34245)
at RouterOutlet.deactivate (router.js:9122)
at ActivateRoutes.deactivateRouteAndOutlet (router.js:4023)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41686)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)
at invokeTask (zone-evergreen.js:484)
at ZoneTask.invoke (zone-evergreen.js:469)

Please what am I doing wrong?

@ContatoClubeCodigo
Copy link

vc conseguiu.
eu ainda tenho este erro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants