Skip to content

Commit

Permalink
Merge branch 'main' into kw-enable-debug-log-level
Browse files Browse the repository at this point in the history
  • Loading branch information
kryswisnaskas authored Jun 4, 2021
2 parents bf988b4 + fcd330a commit c47072b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@
"coveragePathIgnorePatterns": [
"<rootDir>/src/index.js",
"<rootDir>/src/setupProxy.js",
"<rootDir>/src/pages/NotFound/index.js"
"<rootDir>/src/pages/NotFound/index.js",
"<rootDir>/src/polyfills.js"
],
"coverageThreshold": {
"global": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
import './polyfills';
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/pages/Landing/Filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ function Filter({ applyFilters, forMyAlerts }) {
// https://reactjs.org/docs/events.html#detecting-focus-entering-and-leaving
// e.relatedTarget can be null when focus changes within the menu (when using VoiceOver)

/**
* We check for these because if we don't, the filter menu will abruptly close when the calendar day
* or the month navigation buttons are clicked, rendering the date picker un-usable
*/
const isCalendarControl = e.target.matches('.CalendarDay, .DayPickerNavigation_button');

if (!isCalendarControl && !e.currentTarget.contains(e.relatedTarget)) {
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/polyfills.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector
|| Element.prototype.webkitMatchesSelector;
}

0 comments on commit c47072b

Please sign in to comment.