Skip to content

Commit

Permalink
Revert "Make buttons in a modal form have proper type. (#25446)" (#25485
Browse files Browse the repository at this point in the history
)

There is a side effect because some modal doesn't have a proper "ok"
button.

This reverts commit a954c93.
  • Loading branch information
wxiaoguang authored Jun 25, 2023
1 parent 77e449f commit b825360
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b825360

Please sign in to comment.