Skip to content

Commit

Permalink
FilterOptions: replace new Event() with DOM.trigger() (#1058)
Browse files Browse the repository at this point in the history
The event constructor does not work in ie11, but we have an
ie11 compliant implementation with DOM.trigger()

T=https://yextops.zendesk.com/agent/tickets/348126
TEST=manual

Test that before, in browserstack ie11,
 clicking the X button in a searchable facet has console error

With code change, no console error

and that it still clears the facet search input on chrome + ie11
  • Loading branch information
oshi97 committed Sep 2, 2020
1 parent a281546 commit 24c08e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ui/components/filters/filteroptionscomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,7 @@ export default class FilterOptionsComponent extends Component {
if (clearSearchEl && searchInputEl) {
DOM.on(clearSearchEl, 'click', event => {
searchInputEl.value = '';
searchInputEl.dispatchEvent(new Event('input', {
'bubbles': true,
'cancelable': true
}));
DOM.trigger(searchInputEl, 'input');
searchInputEl.focus();
});
}
Expand Down

0 comments on commit 24c08e4

Please sign in to comment.