Open dynajoe opened 5 years ago
The second example will also work if you change onSubmit
to be processed asynchronously by setting stopPropagation
to False
. So the code works with either an async form submit or with the removal of onBlur
.
This should now be solved with the new version elm/core@1.0.5
. should this now be closed?
Here's a few examples of the problem:
A working example (expectation that time in milliseconds is displayed): https://ellie-app.com/3MrbG47yNZPa1
A failure example with the only difference being the addition of addition of
onBlur NoOp
to the text input:https://ellie-app.com/3Mr9PQz7zvha1
Another failure example where the form is maintained in the DOM and the node that produced the Blur event is removed:
https://ellie-app.com/3MrmxXvLjfga1
The expectation is that in the two failure cases the Time.now Task is run.
Background
How I came about this issue in a real world example:
Here are examples of the stack around when the expected Task was produced:
Pressing Enter Key:![image](https://user-images.githubusercontent.com/696255/47889172-8e216480-de16-11e8-8f0c-fdf41abcaeed.png)
Clicking Submit:![image](https://user-images.githubusercontent.com/696255/47889164-8497fc80-de16-11e8-95d7-f0220eeb8166.png)