mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
ui: fix form submit event
This commit is contained in:
1 parent
0e356327b2
commit
7a6c19fbc5
2 files changed
+2
-2
No files matched your search
@@ -14,7 +14,7 @@ const formPage = new AutoloadPage('formPage', () => {
|
||||
|
||||
const submitting = {};
|
||||
$(document).on('click', '[type="submit"]', (ev) => {
|
||||
if (!submitting[ev.currentTarget]) ev.preventDefault();
|
||||
if (submitting[ev.currentTarget]) ev.preventDefault();
|
||||
submitting[ev.currentTarget] = true;
|
||||
delay(5000).then(() => { submitting[ev.currentTarget] = false; });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user