# Null reference error in Internet Explorer

**URL:** <https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737>\
**Category:** Learn\
**Created:** [June 4, 2019, 3:34pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737 "2019-06-04T15:34:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoderDennis](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/coderdennis/32/852_2.png) [@CoderDennis](https://discourse.elm-lang.org/u/CoderDennis)\
**Post date:** [June 4, 2019, 3:34pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737/1 "2019-06-04T15:34:12Z")

</div>

Somewhat randomly, Elm onClick events stop working in Internet Explorer. (Only concerned with latest IE 11. No need to support older browsers.)

We never had this problem before upgrading to Elm 0.19.

The IE console gets the following error:  
`SCRIPT5007: Unable to get property 'j' of undefined or null reference Main.elm (3524,1)`

This points to the line `while (tagger = currentEventNode.j)` inside the function `function _VirtualDom_makeCallback(eventNode, initialHandler)`

Is this a known issue? Is there an easy workaround?

Once it starts getting the error, any onClick event produces the error and the whole app basically stops working. This is a major show-stopping bug for us.

---

<div class="post-metadata">

**Author:** ![opvasger](https://avatars.discourse-cdn.com/v4/letter/o/8e8cbc/32.png) [@opvasger](https://discourse.elm-lang.org/u/opvasger)\
**Post date:** [June 4, 2019, 5:18pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737/2 "2019-06-04T17:18:58Z")

</div>

A workaround I’ve used before to deal with a somewhat different situation was to add a script to my build-step that patches the javascript from the Elm compiler before minification.

This is obviously only until its officially patched in virtual dom

If you can create a minimal examle in [ellie](https://ellie-app.com/new) that crashes on ie11, I try to fix it and send you back an example where I patch the issue ☀

---

<div class="post-metadata">

**Author:** ![CoderDennis](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/coderdennis/32/852_2.png) [@CoderDennis](https://discourse.elm-lang.org/u/CoderDennis)\
**Post date:** [June 4, 2019, 5:29pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737/3 "2019-06-04T17:29:57Z")

</div>

Well, it appears ellie doesn’t support IE. I can’t say I blame them. It’s a horrible pain.

> <https://github.com/ellie-app/ellie/issues/65>

I’ll see if I can come up with a minimal example and post to GitHub

---

<div class="post-metadata">

**Author:** ![CoderDennis](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/coderdennis/32/852_2.png) [@CoderDennis](https://discourse.elm-lang.org/u/CoderDennis)\
**Post date:** [June 4, 2019, 6:47pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737/4 "2019-06-04T18:47:31Z")

</div>

The workaround here seems to have fixed the problem.

> <https://github.com/elm/virtual-dom/issues/101#issuecomment-360244640>

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [June 14, 2019, 6:47pm UTC](https://discourse.elm-lang.org/t/null-reference-error-in-internet-explorer/3737/5 "2019-06-14T18:47:36Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
