Skip to content

Commit 7937738

Browse files
committed
fix form component
1 parent c245e1b commit 7937738

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/form-inputs/form/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export class Form extends _FormBase {
2424
})
2525
}
2626

27+
// domProps.onsubmit is flaky, let's do with jQuery instead
28+
$(this.$el).submit(function (e) {
29+
e.preventDefault();
30+
});
31+
2732
$(this.$el).form(opt)
2833

2934
}
@@ -36,7 +41,8 @@ export class Form extends _FormBase {
3641
return ch('form', {
3742
class: 'ui form',
3843
domProps: {
39-
onsubmit: function () {
44+
onsubmit: function onsubmit(e) {
45+
e.preventDefault();
4046
return false;
4147
}
4248
}

0 commit comments

Comments
 (0)