Skip to content

Commit e109837

Browse files
Merge branch 'main' into kw-enable-debug-log-level
2 parents 8626a8e + 2a41572 commit e109837

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

frontend/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@
149149
"coveragePathIgnorePatterns": [
150150
"<rootDir>/src/index.js",
151151
"<rootDir>/src/setupProxy.js",
152-
"<rootDir>/src/pages/NotFound/index.js"
152+
"<rootDir>/src/pages/NotFound/index.js",
153+
"<rootDir>/src/polyfills.js"
153154
],
154155
"coverageThreshold": {
155156
"global": {

frontend/src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'react-app-polyfill/ie11';
22
import 'react-app-polyfill/stable';
3+
import './polyfills';
34
import React from 'react';
45
import ReactDOM from 'react-dom';
56
import './index.css';

frontend/src/pages/Landing/Filter.js

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ function Filter({ applyFilters, forMyAlerts }) {
7676
// https://reactjs.org/docs/events.html#detecting-focus-entering-and-leaving
7777
// e.relatedTarget can be null when focus changes within the menu (when using VoiceOver)
7878

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

8185
if (!isCalendarControl && !e.currentTarget.contains(e.relatedTarget)) {

frontend/src/polyfills.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (!Element.prototype.matches) {
2+
Element.prototype.matches = Element.prototype.msMatchesSelector
3+
|| Element.prototype.webkitMatchesSelector;
4+
}

0 commit comments

Comments
 (0)