ui: fix discussion_edit ctrl+enter hotkey

This commit is contained in:
undefined committed 2022-12-28 19:54:56 +08:00
1 parent e365c3ccd6
commit 013ae1172b
3 files changed
+5 -3

No files matched your search

@@ -146,7 +146,9 @@ export function registerAction(
monaco.KeyMod.WinCtrl | monaco.KeyCode.Enter,
],
run: () => {
$(element).closest('form').submit();
const form = $(element).closest('form');
if (form.find('[data-default-submit]').length) form.find('[data-default-submit]').click();
else form.submit();
},
});
}