From 233cb9528921c4be36946a2e663f595afaf22be4 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Tue, 14 Jul 2020 02:35:46 -0400 Subject: [PATCH] Ignore events which don't change text input - fixes #1134 (#2846) * Ignore events which don't change text input - fixes #1134 * Fix bind --- .../webapp/modules/core/scripts/facets/text-search-facet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/webapp/modules/core/scripts/facets/text-search-facet.js b/main/webapp/modules/core/scripts/facets/text-search-facet.js index c08f9dbd1..45b7afcab 100644 --- a/main/webapp/modules/core/scripts/facets/text-search-facet.js +++ b/main/webapp/modules/core/scripts/facets/text-search-facet.js @@ -150,8 +150,8 @@ TextSearchFacet.prototype._initializeUI = function() { } this._elmts.input.bind("keyup change input",function(evt) { - // Ignore non-character keyup changes - if(evt.type === "keyup" && (this.value === self._query || this.value === '' && !self._query)) { + // Ignore events which don't change our input value + if(this.value === self._query || this.value === '' && !self._query) { return; } self._query = this.value; @@ -232,4 +232,4 @@ TextSearchFacet.prototype._updateRest = function() { var textSearchFacetCounterForLabels = 0; TextSearchFacet.prototype._uniqueIdForLabels = function() { return textSearchFacetCounterForLabels++; -}; \ No newline at end of file +};