From babbb79eb0c23ab1958f768f09d2199d37c60135 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 24 Jun 2023 15:17:47 +0800 Subject: [PATCH] Revert "Make buttons in a modal form have proper type. (#25446)" This reverts commit a954c93a68072042aa7dad717b6fa002c83a58fb. --- web_src/js/features/common-global.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index 8bbf202eff8b4..e5fd7c29fce6e 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -395,8 +395,6 @@ function initGlobalShowModal() { if (colorPickers.length > 0) { initCompColorPicker(); // FIXME: this might cause duplicate init } - // all non-"ok" buttons which do not have "type" should not submit the form, should not be triggered by "Enter" - $modal.find('form button:not(.ok):not([type])').attr('type', 'button'); $modal.modal('setting', { onApprove: () => { // "form-fetch-action" can handle network errors gracefully,