mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 05:54:01 +01:00
Backport #25446 by @wxiaoguang Fix #25438 All non-"ok" buttons which do not have "type" should not submit the form, should not be triggered by "Enter". Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
51789ba12d
commit
050c38ca19
1 changed files with 2 additions and 0 deletions
|
@ -345,6 +345,8 @@ 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) {
|
||||||
|
|
Loading…
Reference in a new issue