diff --git a/src/components/FilterPopup/FilterPopup.js b/src/components/FilterPopup/FilterPopup.js index 3ba087c0..dd076349 100644 --- a/src/components/FilterPopup/FilterPopup.js +++ b/src/components/FilterPopup/FilterPopup.js @@ -3,6 +3,7 @@ import { bool, func, node, number, object, string } from 'prop-types'; import classNames from 'classnames'; import { injectIntl, intlShape } from 'react-intl'; +import { OutsideClickHandler } from '../../components'; import { FilterForm } from '../../forms'; import css from './FilterPopup.css'; @@ -53,12 +54,8 @@ class FilterPopup extends Component { onSubmit(urlParam, initialValues); } - handleBlur(event) { - // FocusEvent is fired faster than the link elements native click handler - // gets its own event. Therefore, we need to check the origin of this FocusEvent. - if (event.relatedTarget && !this.filter.contains(event.relatedTarget)) { - this.setState({ isOpen: false }); - } + handleBlur() { + this.setState({ isOpen: false }); } handleKeyDown(e) { @@ -119,41 +116,42 @@ class FilterPopup extends Component { const contentStyle = this.positionStyleForContent(); return ( -