Fix awesomplete keydown

This commit is contained in:
oc 2019-07-24 10:46:22 +08:00
parent 2ea8b012a8
commit 36cdcd0dbd

View File

@ -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,