Преглед изворни кода

Editor: Turn off autocomplete of input elements. (#22157)

Michael Herzog пре 4 година
родитељ
комит
fa2d0517c5
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      editor/js/libs/ui.js

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

@@ -267,6 +267,8 @@ class UIInput extends UIElement {
 		this.dom.style.padding = '2px';
 		this.dom.style.border = '1px solid transparent';
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 		this.dom.addEventListener( 'keydown', function ( event ) {
 
 			event.stopPropagation();
@@ -303,6 +305,8 @@ class UITextArea extends UIElement {
 		this.dom.style.padding = '2px';
 		this.dom.spellcheck = false;
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 		this.dom.addEventListener( 'keydown', function ( event ) {
 
 			event.stopPropagation();
@@ -348,6 +352,8 @@ class UISelect extends UIElement {
 		this.dom.className = 'Select';
 		this.dom.style.padding = '2px';
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 	}
 
 	setMultiple( boolean ) {
@@ -452,6 +458,8 @@ class UIColor extends UIElement {
 		this.dom.style.padding = '2px';
 		this.dom.style.backgroundColor = 'transparent';
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 		try {
 
 			this.dom.type = 'color';
@@ -501,6 +509,8 @@ class UINumber extends UIElement {
 		this.dom.className = 'Number';
 		this.dom.value = '0.00';
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 		this.value = 0;
 
 		this.min = - Infinity;
@@ -767,6 +777,8 @@ class UIInteger extends UIElement {
 		this.dom.className = 'Number';
 		this.dom.value = '0';
 
+		this.dom.setAttribute( 'autocomplete', 'off' );
+
 		this.value = 0;
 
 		this.min = - Infinity;