We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b81bcd5 commit 2cef879Copy full SHA for 2cef879
src/Smartstore.Web/wwwroot/js/smartstore.globalinit.js
@@ -80,13 +80,18 @@ jQuery(function () {
80
});
81
82
// Prevent (button) multiclick
83
- $(document).on('click', '.btn-prevent-multiclick', function () {
+ $(document).on('click', '.btn-prevent-multiclick', function (e) {
84
let el = $(this);
85
let containingForm = el.closest("form");
86
87
if (containingForm.length) {
88
el.prop('disabled', true);
89
- containingForm.trigger('submit');
+
90
+ const submitEvent = new Event('submit', {
91
+ bubbles: true,
92
+ cancelable: true
93
+ });
94
+ containingForm[0].dispatchEvent(submitEvent);
95
96
if (!containingForm.valid()) {
97
el.prop('disabled', false);
0 commit comments