Merge pull request #15517 from Budibase/BUDI-9016/fix-clickoutside-on-firefox
Fix clickoutside on firefox
This commit is contained in:
commit
72f8a3faea
|
@ -93,7 +93,10 @@ const handleMouseDown = (e: MouseEvent) => {
|
|||
|
||||
// Handle iframe clicks by detecting a loss of focus on the main window
|
||||
const handleBlur = () => {
|
||||
if (document.activeElement?.tagName === "IFRAME") {
|
||||
if (
|
||||
document.activeElement &&
|
||||
["IFRAME", "BODY"].includes(document.activeElement.tagName)
|
||||
) {
|
||||
handleClick(
|
||||
new MouseEvent("click", { relatedTarget: document.activeElement })
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue