Skip to content

Commit 8d761ad

Browse files
committed
use click event
1 parent a25b885 commit 8d761ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/utils/dom.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function submitEventSubmitter(e) {
205205
export function initSubmitEventPolyfill() {
206206
if (!needSubmitEventPolyfill) return;
207207
console.warn(`This browser doesn't have "SubmitEvent" support, use a tricky method to polyfill`);
208-
document.addEventListener('mousedown', (e) => {
208+
document.addEventListener('click', (e) => {
209209
if (!e.target.form) return;
210210
const isSubmitButton = ((e.target.nodeName === 'INPUT' || e.target.nodeName === 'BUTTON') && e.target.type === 'submit');
211211
e.target.form._submitter = isSubmitButton ? e.target : null;

0 commit comments

Comments
 (0)