GithubHelp home page GithubHelp logo

Comments (4)

antony-booth avatar antony-booth commented on July 30, 2024 1

I don't know whether this is related, but the behavior is the same: -

core.js:1440 ERROR TypeError: Cannot read property 'fire' of undefined
at e.o.immedateCheckActiveButtons (jodit.min.js:10) 
at eval (jodit.min.js:10) 
at ZoneDelegate.invokeTask (zone.js:421) 
at Object.onInvokeTask (core.js:4724) 
at ZoneDelegate.invokeTask (zone.js:420) 
at Zone.runTask (zone.js:188) 
at ZoneTask.invokeTask (zone.js:495) 
at ZoneTask.invoke (zone.js:484) 
at timer (zone.js:2065)

Navigating away from the editor with a routerLink.

It seems to be at this line (sorry it's the minified version of jodit.min): -
1451: o.jodit.events.fire("updateToolbar"))

I don't know if this resolves it, but I read that setting an element id for the editor with an alpha prefix, may resolve it. I.E: <editor id="a123"/>, but as jodit-angular wraps it, I can't set it directly.

from jodit-angular.

itsmoirob avatar itsmoirob commented on July 30, 2024

So while trying to figure out how to use setEditorValue and going through the source code, I see that you are using the code from xdan/jodit#9 (comment) I removed this wrapper, used the code mentioned directly, and noticed that this error is also in that code.

After doing a quick investigation it appears the the ngOnDestroy isnt working correctly as the component is already destroyed before the call to jodit.destruct() can be fired. This can be linked to the feature request ngBeforeDestroy here angular/angular#17404

Removing the ngOnDestroy will prevent the o.jodit.events undefined error from appearing, although a new method to run jodit.destruct() may be required.

from jodit-angular.

xdan avatar xdan commented on July 30, 2024

Hi, fixed. Thank you!

from jodit-angular.

GovindaRajbhar avatar GovindaRajbhar commented on July 30, 2024

I am also facing the same issue

ExecutiveSummaryComponent.html:13 ERROR TypeError: Cannot read property 'fire' of undefined
at t.setEditorValue (jodit.min.js:10)
at JoditAngularComponent.set [as value] (jodit-angular.js:92)
at JoditAngularComponent.webpackJsonp.82e334896ad5897e90c8.JoditAngularComponent.writeValue (jodit-angular.js:142)
at forms.js:2392
at forms.js:3973
at Array.forEach ()
at FormControl.webpackJsonp.93200bbb0ebc67b1d3cd.FormControl.setValue (forms.js:3973)
at ExecutiveSummaryComponent.webpackJsonp.82e334896ad5897e90c8.ExecutiveSummaryComponent.resetForm (executive-summary.component.ts:171)
at ExecutiveSummaryComponent.webpackJsonp.82e334896ad5897e90c8.ExecutiveSummaryComponent.toggleIsCollapsed (executive-summary.component.ts:177)
at Object.eval [as handleEvent] (ExecutiveSummaryComponent.html:13)

from jodit-angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.