summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-24 21:28:55 +0800
committerGitHub <noreply@github.com>2023-06-24 13:28:55 +0000
commitd1f1f1142ed6fd58e521587454a36827c320a5f6 (patch)
tree507ddd3b209ec8d92a93819f96ad0e41a8303ada
parent2cd9d6b3f94d443860202693f51a2c009f7c768e (diff)
downloadgitea-d1f1f1142ed6fd58e521587454a36827c320a5f6.tar.gz
gitea-d1f1f1142ed6fd58e521587454a36827c320a5f6.zip
Revert "Make buttons in a modal form have proper type. (#25446) (#25478)" (#25484)
There is a side effect because some modal doesn't have a proper "ok" button. This reverts commit 050c38ca19cce06040741321e7871121981c76f4.
-rw-r--r--web_src/js/features/common-global.js2
1 files changed, 0 insertions, 2 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index e6421b3a2f..46a80beb51 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -345,8 +345,6 @@ export function initGlobalButtons() {
if (colorPickers.length > 0) {
initCompColorPicker();
}
- // all non-"ok" buttons which do not have "type" should not submit the form, should not be triggered by "Enter"
- $($(this).attr('data-modal')).find('form button:not(.ok):not([type])').attr('type', 'button');
});
$('.delete-post.button').on('click', function (e) {