Przeglądaj źródła

Stag mods to autocomplete JS

Vijayakrishnan Krishnan 4 lat temu
rodzic
commit
4fe6d9387b
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      public/js/autocomplete-lhc.js

+ 3 - 3
public/js/autocomplete-lhc.js

@@ -1420,7 +1420,7 @@ if (typeof Def === 'undefined') Def = {};
        * @param field the field for which the lookup key is needed.
        */
       lookupKey: function lookupKey(field) {
-        return field.name || field.id;
+        return field.id || field.name; // STAG: look for "id" first
       },
 
       /**
@@ -1512,7 +1512,7 @@ if (typeof Def === 'undefined') Def = {};
 
         this.logElement_ = document.createElement('div');
         this.logElement_.setAttribute('id', logID);
-        document.body.appendChild(this.logElement_);
+        $('body').append($(this.logElement_)); // STAG: do not assume document.body
       } else this.logElement_ = document.getElementById(logID);
 
       this.logElement_.setAttribute('aria-live', 'assertive');
@@ -7556,4 +7556,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
 })();
 
 /***/ })
-/******/ ]);
+/******/ ]);