Skip to content

Commit

Permalink
fixed JS bug with updating the search input with the suggested search…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
Rob Locke committed Jan 24, 2024
1 parent bab4ef6 commit 79ddf8c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion supersearch-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


function supersearch_enqueue_scripts() {
wp_enqueue_script('supersearch-autocomplete', plugin_dir_url(__FILE__) . 'supersearch.js', [], '1.2.9', true);
wp_enqueue_script('supersearch-autocomplete', plugin_dir_url(__FILE__) . 'supersearch.js', [], '1.3.0', true);
wp_enqueue_script('featherlight', plugin_dir_url(__FILE__) . 'featherlight.min.js', [], '1.0', true);
}
add_action('wp_enqueue_scripts', 'supersearch_enqueue_scripts');
Expand Down
1 change: 1 addition & 0 deletions supersearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ document.addEventListener('DOMContentLoaded', function () {
window.addEventListener('message', function (event) {
if (event.origin !== searchURL) return;
if (event.data && event.data.is_suggestion === 'true') {
var searchInput = document.getElementById('supersearch-input');
if (searchInput.value !== event.data.data) {
searchInput.value = event.data.data;
searchInput.focus();
Expand Down
2 changes: 1 addition & 1 deletion supersearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Plugin Name: Super Search
* Description: Super Search provides a hyperfast search solution for your WordPress site.
* Version: 1.0.3
* Version: 1.0.4
* Author: https://www.hi-orbit.com
*/

Expand Down

0 comments on commit 79ddf8c

Please sign in to comment.