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

Uncaught TypeError: Cannot assign to read only property 'className' of object [DOM mutations from FontAwesome] #172

Open
Clindbergh opened this issue Sep 9, 2020 · 1 comment

Comments

@Clindbergh
Copy link

I have encountered the following exception in multiple projects:

stubbornlove.js:2842 Uncaught TypeError: Cannot assign to read only property 'className' of object '#'
at _VirtualDom_applyFacts (stubbornlove.js:2842)
at _VirtualDom_applyPatch (stubbornlove.js:3719)
at _VirtualDom_applyPatchesHelp (stubbornlove.js:3702)
at _VirtualDom_applyPatches (stubbornlove.js:3693)
at stubbornlove.js:3982
at updateIfNeeded (stubbornlove.js:4017)

I haven't been able to isolate the issue a can't post the entire source. The error appeared after a Msg from an ajax response triggered a view change. As a result the html doesn't properly update anymore and the exception is caused after every update.

Any hints why this problem might appear and possible workarounds? Once I'll be successful to isolate the issue.

@Clindbergh Clindbergh changed the title Uncaught TypeError: Cannot assign to read only property 'className' of object Uncaught TypeError: Cannot assign to read only property 'className' of object [DOM mutations from FontAwesome] Sep 9, 2020
@Clindbergh
Copy link
Author

Apparently this issue is because the javascript library Font Awesome did some dom mutations when including the icons. The workaround is to use elm-fontawesome.

How can we prevent Elm from crashing when external js code alters the DOM?

Notes:

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

1 participant