未验证 提交 fa2d0517 编写于 作者: M Michael Herzog 提交者: GitHub

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

上级 35bdc42a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册