Skip to content

Commit

Permalink
Turn off mouse events on the dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow authored and osma committed Apr 23, 2019
1 parent 6cabf1c commit 508c6d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,16 @@ $(function() { // DOCUMENT READY
$('.clear-search').addClass('clear-search-dark');
}
});

// monkey-patching TypeAhead's Dropdown object for: https://github.com/NatLibFi/Skosmos/issues/773
// Updating typeahead.js to 0.11 requires a few changes that are not really complicated.
// However, our dropdown style is broken, and it appears hard to be fixed. typeahead.js
// Also does not appear to be maintained, so this temporary fix will prevent
// accidental selection of values. TODO: we must fix this in a future release, possibly
// using another library.
var typeaheadInstance = $typeahead.data("ttTypeahead");
typeaheadInstance.dropdown.$menu.off("mouseenter.tt", ".tt-suggestion");
typeaheadInstance.dropdown.$menu.off("mouseleave.tt", ".tt-suggestion");
}

// storing the search input before autocompletion changes it
Expand Down

0 comments on commit 508c6d9

Please sign in to comment.