I haven't got this narrowed down enough yet to produce a small, isolated
case — or to diagnose what's happening — but I wanted to see whether this
rings a bell with anyone before I dig further.

In Elm 0.18 using Michael Combs's update to the MDL package, I'm using MDL
text fields in a view via the TEA support rather than via Parts. (I don't
know that that's an issue but it seemed worth calling out.) If I dismiss
the view by hitting return while a textfield is active, I see the following
things happen:

1. The model switches to the next state. It fires up a new view using its
own version of MDL (parts based this time). That gets displayed and
everything appears in order.

2. The blur message for the text field from the old view now comes through
and gets tagged with the route for the new view tree.

3. That tagged blur message gets delivered to the update logic for the new
view and we end up crashing with a JavaScript TypeError.

There is no native code in the MDL libraries, so this is the stock Elm 0.18
implementation crashing with a "Not A Function" type error.

My wild guess is that the old text field had a handler attached for the
blur event which dispatched the message in question and that then rose up
through the DOM even though the text field should actually be gone from the
DOM. That then resulted in it passing through a tagger node which tagged it
for the new state of the tree. But that's just a theory.

Has anyone seen anything like this before? Does anyone have any better
theories?

Thanks.
Mark

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to