From d305e06c43ecfb5f989b459764319d07c2788174 Mon Sep 17 00:00:00 2001 From: Michiel Spiritus Date: Wed, 28 Jun 2023 13:26:42 +0200 Subject: [PATCH] navigating/selecting services fix --- .../apps/groovyconsole/clientlibs/js/services.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/services.js b/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/services.js index 54ebd936..8b37446a 100644 --- a/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/services.js +++ b/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/services.js @@ -7,16 +7,17 @@ $(function () { scriptEditor.navigateFileEnd(); - if (scriptEditor.getCursorPosition().column > 0) { + if (scriptEditor.getCursorPosition().column > 0 ) { scriptEditor.insert('\n\n'); } - scriptEditor.insert(declaration); - + if((event.keyCode === 13 || event.which === 13)) { + scriptEditor.insert(declaration); + } return ''; } }); $('#btn-group-services').fadeIn('fast'); }); -}); \ No newline at end of file +});