1
0
Fork 0

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 050c38ca19.
This commit is contained in:
wxiaoguang 2023-06-24 21:28:55 +08:00 committed by GitHub
parent 2cd9d6b3f9
commit d1f1f1142e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,8 +345,6 @@ export function initGlobalButtons() {
if (colorPickers.length > 0) { if (colorPickers.length > 0) {
initCompColorPicker(); 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) { $('.delete-post.button').on('click', function (e) {