Skip to content

Commit

Permalink
Merge pull request #15517 from Budibase/BUDI-9016/fix-clickoutside-on…
Browse files Browse the repository at this point in the history
…-firefox

Fix clickoutside on firefox
  • Loading branch information
adrinr authored Feb 11, 2025
2 parents 248ddbb + 1e47a79 commit 72f8a3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bbui/src/Actions/click_outside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
)
Expand Down

0 comments on commit 72f8a3f

Please sign in to comment.