mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +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 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"]');
|
||||
|
||||
if (
|
||||
!e.currentTarget.contains(e.relatedTarget) &&
|
||||
e.relatedTarget !== buttonRef.current &&
|
||||
e.relatedTarget !== ulListBox
|
||||
e.relatedTarget !== ulListBox &&
|
||||
notNull
|
||||
) {
|
||||
setIsVisible(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user