浏览代码

Remove unused element attributes

JC Brand 6 年之前
父节点
当前提交
8d385487c9
共有 1 个文件被更改,包括 0 次插入10 次删除
  1. 0 10
      src/converse-autocomplete.js

+ 0 - 10
src/converse-autocomplete.js

@@ -90,7 +90,6 @@ converse.plugins.add("converse-autocomplete", {
                     this.container = el.querySelector('.suggestion-box');
                 }
                 this.input = this.container.querySelector('.suggestion-box__input');
-                this.input.setAttribute("autocomplete", "off");
                 this.input.setAttribute("aria-autocomplete", "list");
 
                 this.ul = this.container.querySelector('.suggestion-box__results');
@@ -215,15 +214,6 @@ converse.plugins.add("converse-autocomplete", {
                 //remove events from the input and its form
                 helpers.unbind(this.input, this._events.input);
                 helpers.unbind(this.input.form, this._events.form);
-
-                //move the input out of the suggestion-box container and remove the container and its children
-                const parentNode = this.container.parentNode;
-
-                parentNode.insertBefore(this.input, this.container);
-                parentNode.removeChild(this.container);
-
-                //remove autocomplete and aria-autocomplete attributes
-                this.input.removeAttribute("autocomplete");
                 this.input.removeAttribute("aria-autocomplete");
             }