From 9db76036bb6b937b6aa480906c5aafef1d4359ad Mon Sep 17 00:00:00 2001 From: Gusted Date: Tue, 26 Mar 2024 00:25:36 +0100 Subject: [PATCH] [BUG] Fix Ctrl+Enter on editor - Add event listener for the `ce-quick-submit` event, which will be triggered if `Ctrl+Enter` is pressed on a text area. - Regression of 5cc0801de90d16b4d528e62de11c9b525be5d122 - Resolves #2762 --- web_src/js/features/repo-legacy.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 96cfa78d0..6155b3a5d 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -468,6 +468,9 @@ async function onEditContent(event) { e.preventDefault(); saveAndRefresh(dz); }); + $editContentZone.on('ce-quick-submit', () => { + $editContentZone.find('.save.button').trigger('click'); + }); } else { comboMarkdownEditor = getComboMarkdownEditor($editContentZone.find('.combo-markdown-editor')); }