Move modal consideration CSS selector up a few levels to underlay to prevent modal close clicks triggering external handlers
This commit is contained in:
parent
e01e91e075
commit
5b0ba593b8
|
@ -26,8 +26,8 @@ const handleClick = event => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore clicks for modals, unless the handler is registered from a modal
|
// Ignore clicks for modals, unless the handler is registered from a modal
|
||||||
const sourceInModal = handler.anchor.closest(".spectrum-Modal") != null
|
const sourceInModal = handler.anchor.closest(".spectrum-Underlay") != null
|
||||||
const clickInModal = event.target.closest(".spectrum-Modal") != null
|
const clickInModal = event.target.closest(".spectrum-Underlay") != null
|
||||||
if (clickInModal && !sourceInModal) {
|
if (clickInModal && !sourceInModal) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue