Bug 1609368 - remove unused autocompleteinput attr from calendar-event-dialog-attendees-custom-elements.js and glodacomplete.js. r=pmorris
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 15 Jan 2020 11:50:05 +0200
changeset 37964 0f39093dc5be658bc47b804c22a9ed348e5df00d
parent 37963 c47043e46217349fbe67f5890725091830d8e155
child 37965 5bec5e3eff807a7c21d3003c0cc7fc062974b5d9
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewerspmorris
bugs1609368
Bug 1609368 - remove unused autocompleteinput attr from calendar-event-dialog-attendees-custom-elements.js and glodacomplete.js. r=pmorris
calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
mailnews/db/gloda/content/glodacomplete.js
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
@@ -337,17 +337,16 @@
           // the different attendees. In this case we set the focus
           // appropriately and stop the event propagation.
           if (this.mPopupOpen || this.mIsReadOnly || this.mIsInvitation) {
             return;
           }
           if (event.originalTarget.localName == "input") {
             let input = event.originalTarget;
 
-            input.setAttribute("autocompleteinput", input.id);
             this.mPopupOpen = true;
 
             switch (event.key) {
               case "ArrowUp":
                 this.arrowHit(input, -1);
                 event.stopPropagation();
                 break;
               case "ArrowDown":
--- a/mailnews/db/gloda/content/glodacomplete.js
+++ b/mailnews/db/gloda/content/glodacomplete.js
@@ -15,56 +15,41 @@
    * to append all the results for the gloda search autocomplete.
    *
    * @extends {MozPopupElement}
    */
   class MozGlodacompleteRichResultPopup extends MozPopupElement {
     constructor() {
       super();
 
-      this.inputID = null;
-
       this.addEventListener("popupshowing", event => {
         // If normalMaxRows wasn't already set by the input, then set it here
         // so that we restore the correct number when the popup is hidden.
 
         // Null-check this.mInput; see bug 1017914
         if (this._normalMaxRows < 0 && this.mInput) {
           this._normalMaxRows = this.mInput.maxRows;
         }
 
-        // Set an attribute for styling the popup based on the input.
-        if (
-          !this.inputID &&
-          this.mInput &&
-          this.mInput.ownerDocument &&
-          this.mInput.ownerDocument.documentURIObject.schemeIs("chrome")
-        ) {
-          this.inputID = this.mInput.id;
-        }
-        this.setAttribute("autocompleteinput", this.inputID);
-
         this.mPopupOpen = true;
       });
 
       this.addEventListener("popupshown", event => {
         if (this._adjustHeightOnPopupShown) {
           delete this._adjustHeightOnPopupShown;
           this.adjustHeight();
         }
       });
 
       this.addEventListener("popuphiding", event => {
         let isListActive = true;
         if (this.selectedIndex == -1) {
           isListActive = false;
         }
         this.mInput.controller.stopSearch();
-
-        this.removeAttribute("autocompleteinput");
         this.mPopupOpen = false;
 
         // Reset the maxRows property to the cached "normal" value (if there's
         // any), and reset normalMaxRows so that we can detect whether it was set
         // by the input when the popupshowing handler runs.
 
         // Null-check this.mInput; see bug 1017914
         if (this.mInput && this._normalMaxRows > 0) {