Selaa lähdekoodia

HUE-4892 [editor] Support CTRL+enter in parameter inputs

Enrico Berti 9 vuotta sitten
vanhempi
commit
b141170cf4

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1586,7 +1586,7 @@ ${ hueIcons.symbols() }
         <li>
           <div class="input-prepend margin-top-10">
             <span class="muted add-on" data-bind="text: name"></span>
-            <input class="input-medium" type="text" placeholder="${ _("Variable value") }" data-bind="value: value, autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }">
+            <input class="input-medium" type="text" placeholder="${ _("Variable value") }" data-bind="value: value, valueUpdate: 'afterkeydown', autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }, event: { 'keypress': function (context, e){ if (e.ctrlKey && e.which === 13) { $parent.ace().commands.commands['execute'].exec(); } return true; } }">
           </div>
         </li>
       </ul>