Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit changes DOM.trigger to always use our custom event
polyfill, instead of looking in the window first to see if
CustomEvent exists as a function.
Consulting was running into issues with ie11 saying that
it doesn't know how to use the Event constructor. This likely
could have also been fixed by changing
return new Event
toreturn new CustomEvent
, however it feels safer (to me)to always rely on our own polyfill, instead of potentially
using somebody else's polyfill.
J=SPR-1979
TEST=manual
Went on ie11, checked that adding a CustomEvent function onto the
window manually through the dev tools causes the error consulting
was seeing. This was checked by typing into the searchbar,
since the searchcomponent uses DOM.trigger.
Then, removed code and checked that there were no errors,
and autocomplete was displaying values that I could click on
to run a search. Also checked on chrome.