Do not intercept keystrokes that include Alt/Ctrl.

This commit is contained in:
Sean Lip
2016-08-05 17:26:23 -07:00
parent 78ae42b267
commit afe3c63cab

View File

@@ -235,7 +235,10 @@ blocklyApp.TreeService = ng.core
return;
}
if (document.activeElement.tagName == 'INPUT') {
if (e.altKey || e.ctrlKey) {
// Do not intercept combinations such as Alt+Home.
return;
} else if (document.activeElement.tagName == 'INPUT') {
// For input fields, only Esc and Tab keystrokes are handled specially.
if (e.keyCode == 27 || e.keyCode == 9) {
// For Esc and Tab keys, the focus is removed from the input field.