diff --git a/build/index.php b/build/index.php old mode 100755 new mode 100644 index a1589de..88233e0 --- a/build/index.php +++ b/build/index.php @@ -2636,12 +2636,14 @@ window.addEventListener("load", function(event) { } // Add the new suggestions to the datalist + var optionsFrag = document.createDocumentFragment(); suggestions.forEach(function(suggestion) { var suggestionElement = document.createElement("option"); suggestionElement.value = suggestion.pagename; suggestionElement.dataset.distance = suggestion.distance; - dataList.appendChild(suggestionElement); + optionsFrag.appendChild(suggestionElement); }); + dataList.appendChild(optionsFrag); }); }); }); diff --git a/module_index.json b/module_index.json index 4ad8bee..ce1bf9b 100755 --- a/module_index.json +++ b/module_index.json @@ -77,7 +77,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.", "id": "feature-search", - "lastupdate": 1479648436, + "lastupdate": 1481051853, "optional": false }, { diff --git a/modules/feature-search.php b/modules/feature-search.php index bd7aad8..5054dd1 100755 --- a/modules/feature-search.php +++ b/modules/feature-search.php @@ -287,12 +287,14 @@ window.addEventListener("load", function(event) { } // Add the new suggestions to the datalist + var optionsFrag = document.createDocumentFragment(); suggestions.forEach(function(suggestion) { var suggestionElement = document.createElement("option"); suggestionElement.value = suggestion.pagename; suggestionElement.dataset.distance = suggestion.distance; - dataList.appendChild(suggestionElement); + optionsFrag.appendChild(suggestionElement); }); + dataList.appendChild(optionsFrag); }); }); });