Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

onBlur=“self.close()” different behaviour in Chrome and Firefox

  • No replies
  • 1 has this problem
  • 24 views
more options

I have a popup, launched from onClick with a URL and a name. In the popup's body tag I have

<body onBlur="self.close()">

With Chrome (Version 89.0.4389.82 (Official Build) (64-bit) on Ubuntu 20.04) it works as intended. If I move focus outside of the popup window the window closes. I can drag the popup around and resize it. I can reuse it with a different URL.

With Firefox (86.0) as soon as I touch the frame (to resize) or the header (to drag) the window closes.

I tried onfocusout, but the window goes to the background and does not close.

What am I doing wrong? Or how can I make Firefox behave like Chrome?

I have a popup, launched from onClick with a URL and a name. In the popup's body tag I have <body onBlur="self.close()"> With Chrome (Version 89.0.4389.82 (Official Build) (64-bit) on Ubuntu 20.04) it works as intended. If I move focus outside of the popup window the window closes. I can drag the popup around and resize it. I can reuse it with a different URL. With Firefox (86.0) as soon as I touch the frame (to resize) or the header (to drag) the window closes. I tried onfocusout, but the window goes to the background and does not close. What am I doing wrong? Or how can I make Firefox behave like Chrome?