mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +00:00
last attempt to fix filters blur in CM
This commit is contained in:
parent
90e6bc6e87
commit
42a761c25d
@ -13,12 +13,15 @@ const Filters = ({ displayedFilters }) => {
|
|||||||
const { trackUsage } = useTracking();
|
const { trackUsage } = useTracking();
|
||||||
|
|
||||||
const handleBlur = e => {
|
const handleBlur = e => {
|
||||||
|
// TO FIX - select's modals prevent blur to work correctly
|
||||||
|
const notNull = e.currentTarget !== null && e.relatedTarget !== null;
|
||||||
const ulListBox = document.querySelector('[role="listbox"]');
|
const ulListBox = document.querySelector('[role="listbox"]');
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!e.currentTarget.contains(e.relatedTarget) &&
|
!e.currentTarget.contains(e.relatedTarget) &&
|
||||||
e.relatedTarget !== buttonRef.current &&
|
e.relatedTarget !== buttonRef.current &&
|
||||||
e.relatedTarget !== ulListBox
|
e.relatedTarget !== ulListBox &&
|
||||||
|
notNull
|
||||||
) {
|
) {
|
||||||
setIsVisible(false);
|
setIsVisible(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user