You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Click the button should just switch the DOM between <form><button/></form> and <button>.
Actual behavior:
On the third click, the submit event is not intercepted, instead it goes to <form> and the entire page reloads.
Inspecting the code, I see fromEvent.js row 22 element.addEventListener is done on the <form> element because submit is classified as non-bubbling. But the event listener is not added back after the form element is gone and then redrawn.
Versions of packages used:
@cycle/dom: 22.0.0
@cycle/run: 5.1.0
xstream: 11.7.0
The text was updated successfully, but these errors were encountered:
This was needed due to a cyclejs bug that is now fixed
in @cycle/dom v22.6.0 by cyclejs/cyclejs#906
This also fixes some bugs in other forms that didn't implement the hack,
like the push transaction form which didn't work after hitting 'back'.
Also see cyclejs/cyclejs#853
It seems like non-bubbling event handlers are not added back to the DOM when underlying DOM nodes are removed/re-added.
Code to reproduce the issue:
Expected behavior:
Click the button should just switch the DOM between
<form><button/></form>
and<button>
.Actual behavior:
On the third click, the
submit
event is not intercepted, instead it goes to<form>
and the entire page reloads.Inspecting the code, I see
fromEvent.js
row 22element.addEventListener
is done on the<form>
element becausesubmit
is classified as non-bubbling. But the event listener is not added back after the form element is gone and then redrawn.Versions of packages used:
@cycle/dom: 22.0.0
@cycle/run: 5.1.0
xstream: 11.7.0
The text was updated successfully, but these errors were encountered: