1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 13:19:37 -05:00

[BUG] Fix Ctrl+Enter on editor

- Backport of #2810
- Add event listener for the `ce-quick-submit` event, which will be
triggered if `Ctrl+Enter` is pressed on a text area.
- Regression of 5cc0801de9
- Resolves #2762

(cherry picked from commit 9db76036bb)
This commit is contained in:
Gusted 2024-03-26 00:25:36 +01:00
parent 4092c544ca
commit f4e526ff07
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -445,6 +445,9 @@ async function onEditContent(event) {
e.preventDefault();
saveAndRefresh(dz, $dropzone);
});
$editContentZone.on('ce-quick-submit', () => {
$editContentZone.find('.save.button').trigger('click');
});
} else {
comboMarkdownEditor = getComboMarkdownEditor($editContentZone.find('.combo-markdown-editor'));
}