Close always on blur
This commit is contained in:
parent
18b296a850
commit
12ae35c16d
|
@ -93,11 +93,9 @@ const handleMouseDown = (e: MouseEvent) => {
|
||||||
|
|
||||||
// Handle iframe clicks by detecting a loss of focus on the main window
|
// Handle iframe clicks by detecting a loss of focus on the main window
|
||||||
const handleBlur = () => {
|
const handleBlur = () => {
|
||||||
if (document.activeElement?.tagName === "IFRAME") {
|
handleClick(
|
||||||
handleClick(
|
new MouseEvent("click", { relatedTarget: document.activeElement })
|
||||||
new MouseEvent("click", { relatedTarget: document.activeElement })
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global singleton listeners for our events
|
// Global singleton listeners for our events
|
||||||
|
|
Loading…
Reference in New Issue