Open jxson opened 10 years ago
Right now adding a submit event doesn't do an event.preventDefault() so the page ends up reloading.
event.preventDefault()
To get around it I have been passing in an array with a custom event handler. For example:
return h('form.login-form', { 'ev-event': [ preventDefault, mercury.submitEvent(state.events.login) ]
It seems that when the element is a form and the event type is a "submit" that the value-event/submit module should probably preventDefault() to keep the page from reloading...
Added a possible solution to v1.3.5
Will need more testing
Right now adding a submit event doesn't do an
event.preventDefault()
so the page ends up reloading.To get around it I have been passing in an array with a custom event handler. For example:
It seems that when the element is a form and the event type is a "submit" that the value-event/submit module should probably preventDefault() to keep the page from reloading...