I'm still trying to create a reproducible minimum example since unfortunately this seems to be disappearing whenever I try to pare down my code to reproduce it. In the meanwhile I'm posting this bug in case anyone has seen this before and can answer and also so that this can serve as a search engine sign post.
In particular, this seems to arise from an onClick attribute on a div. The generated Javascript is
function _VirtualDom_makeCallback(eventNode, initialHandler)
{
function callback(event)
{
var handler = callback.q;
var result = _Json_runHelp(handler.a, event);
if (!$elm$core$Result$isOk(result))
{
return;
}
var tag = $elm$virtual_dom$VirtualDom$toHandlerInt(handler);
// 0 = Normal
// 1 = MayStopPropagation
// 2 = MayPreventDefault
// 3 = Custom
var value = result.a;
var message = !tag ? value : tag < 3 ? value.a : value.message;
var stopPropagation = tag == 1 ? value.b : tag == 3 && value.stopPropagation;
var currentEventNode = (
stopPropagation && event.stopPropagation(),
(tag == 2 ? value.b : tag == 3 && value.preventDefault) && event.preventDefault(),
eventNode
);
var tagger;
var i;
while (tagger = currentEventNode.j)
{
if (typeof tagger == 'function')
{
message = tagger(message);
}
else
{
for (var i = tagger.length; i--; )
{
message = tagger[i](message);
}
}
currentEventNode = currentEventNode.p;
}
currentEventNode(message, stopPropagation); // stopPropagation implies isSync
}
callback.q = initialHandler;
return callback;
}
Turns out there was some subtle interaction with some port code that was touching the DOM in a way that then made it inconsistent with the virtual dom. Closing out as a result.
I'm still trying to create a reproducible minimum example since unfortunately this seems to be disappearing whenever I try to pare down my code to reproduce it. In the meanwhile I'm posting this bug in case anyone has seen this before and can answer and also so that this can serve as a search engine sign post.
In particular, this seems to arise from an
onClick
attribute on adiv
. The generated Javascript isI'll add Elm code when I can create an SSCCE.
Perhaps this is a https://github.com/elm/virtual-dom bug?