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

Remove editor from DOM #15

Open
stiffold opened this issue Sep 19, 2018 · 2 comments
Open

Remove editor from DOM #15

stiffold opened this issue Sep 19, 2018 · 2 comments

Comments

@stiffold
Copy link

stiffold commented Sep 19, 2018

When I write something in the editor and then remove it with ngIf statement:
TypeError: Cannot read property 'current' of undefined undefined TypeError: Cannot read property 'current' of undefined at t.calcPathImd (jodit.min.js:10) at jodit.min.js:10 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:3815) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188) at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:496) at ZoneTask.invoke (zone.js:485) at timer (zone.js:2054)

Steps to reproduce:

  1. Place multiple editors like:
    <jodit-editor [formControl]="control1" *ngIf="control1enabled"></jodit-editor> <jodit-editor [formControl]="control2" *ngIf="control2enabled"></jodit-editor> <jodit-editor [formControl]="control3" *ngIf="control3enabled"></jodit-editor>
  2. Write something to editor with control2
  3. Switch control2enabled to control2enabled = false
@jakub-stejskal
Copy link

Workaround:
add showXPathInStatusbar: false, to the jodit config to prevent the offending method calcPathImd from executing

@douglaslaiber
Copy link

I get error: Cannot read property 'toggle' of undefined.

JoditContainerComponent.html:3 ERROR TypeError: Cannot read property 'toggle' of undefined
at s (jodit.min.js:10)
at e. (jodit.min.js:10)
at e.p (jodit.min.js:10)
at jodit.min.js:10
at Array.every ()
at e. (jodit.min.js:10)
at jodit.min.js:10
at Array.forEach ()
at e.eachEvent (jodit.min.js:10)
at e.fire (jodit.min.js:10)

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

3 participants