Skip to content

Commit

Permalink
Update Closure Library to fix typeblocking autocomplete
Browse files Browse the repository at this point in the history
Change-Id: Ia732cb6a35725ef49bb5605f1ab0bc6a808fe33b
  • Loading branch information
ewpatton authored and jisqyv committed Mar 28, 2019
1 parent 8ebc19f commit fd7e5f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/mit-cml/blockly.git
[submodule "appinventor/lib/closure-library"]
path = appinventor/lib/closure-library
url = https://github.com/google/closure-library.git
url = https://github.com/mit-cml/closure-library.git
10 changes: 9 additions & 1 deletion appinventor/blocklyeditor/src/typeblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ Blockly.TypeBlock.prototype.handleKey = function(e){
case 34: // Page Down
case 35: // Shift
case 36: // End
case 37: // Left Arrow
case 38: // Up Arrow
case 39: // Right Arrow
case 40: // Down Arrow
case 45: // Ins
case 91: // Meta
case 112: // F1
Expand Down Expand Up @@ -197,8 +201,12 @@ Blockly.TypeBlock.prototype.handleKey = function(e){
// Can't seem to make Firefox display first character, so keep all browsers from automatically
// displaying the first character and add it manually.
e.preventDefault();
if (e.charCode == 0) {
// Don't try to render a non-printing character.
return;
}
goog.dom.getElement(this.inputText_).value =
String.fromCharCode(e.charCode != null ? e.charCode : e.keycode);
String.fromCharCode(e.charCode != null ? e.charCode : e.keyCode);
}
};

Expand Down
2 changes: 1 addition & 1 deletion appinventor/lib/closure-library
Submodule closure-library updated 1931 files

0 comments on commit fd7e5f6

Please sign in to comment.