Ver código fonte

Merge pull request #3285 from abow/bug_fixes

fix for ie11 spacebar bug
sebavan 7 anos atrás
pai
commit
18d9c2da38
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      gui/src/controls/inputText.ts

+ 3 - 0
gui/src/controls/inputText.ts

@@ -195,6 +195,9 @@ module BABYLON.GUI {
         public processKey(keyCode: number, key?: string) {
         public processKey(keyCode: number, key?: string) {
             // Specific cases
             // Specific cases
             switch (keyCode) {
             switch (keyCode) {
+                case 32: //SPACE
+                    key = " "; //ie11 key for space is "Spacebar" 
+                    break;
                 case 8: // BACKSPACE
                 case 8: // BACKSPACE
                     if (this._text && this._text.length > 0) {
                     if (this._text && this._text.length > 0) {
                         if (this._cursorOffset === 0) {
                         if (this._cursorOffset === 0) {