Selaa lähdekoodia

ui.js: added same hotkey blockers to other widgets.

Mr.doob 12 vuotta sitten
vanhempi
commit
5299bbb3d3
1 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. 18 0
      editor/js/libs/ui.js

+ 18 - 0
editor/js/libs/ui.js

@@ -206,6 +206,12 @@ UI.TextArea = function () {
 	dom.style.marginLeft = '-2px';
 	dom.style.border = '1px solid #ccc';
 
+	dom.addEventListener( 'keydown', function ( event ) {
+
+		event.stopPropagation();
+
+	}, false );
+
 	this.dom = dom;
 
 	return this;
@@ -525,6 +531,12 @@ UI.Number = function ( number ) {
 	dom.style.cursor = 'col-resize';
 	dom.value = '0.00';
 
+	dom.addEventListener( 'keydown', function ( event ) {
+
+		event.stopPropagation();
+
+	}, false );
+
 	this.min = - Infinity;
 	this.max = Infinity;
 
@@ -679,6 +691,12 @@ UI.Integer = function ( number ) {
 	dom.style.cursor = 'col-resize';
 	dom.value = '0.00';
 
+	dom.addEventListener( 'keydown', function ( event ) {
+
+		event.stopPropagation();
+
+	}, false );
+
 	this.min = - Infinity;
 	this.max = Infinity;