diff --git a/_server/editor_blockly.js b/_server/editor_blockly.js index 7c87bf1e..4c6d5257 100644 --- a/_server/editor_blockly.js +++ b/_server/editor_blockly.js @@ -948,6 +948,17 @@ Blockly.FieldTextInput.prototype.showInlineEditor_ = function(quietInput) { } } else { + + htmlInput.onkeydown = function (e) { + if (e.keyCode == 13 && awesomplete.opened && awesomplete.selected) { + e.stopPropagation(); + e.stopImmediatePropagation(); + e.preventDefault(); + awesomplete.select(); + return false; + } + } + // --- awesomplete var awesomplete = new Awesomplete(htmlInput, { minChars: 4,