Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Opera `window.onfocus`, `window.onblur` events bug.

  • The link to the video demonstration: https://youtu.be/noJWd6bBkUs

    The description

    Opera triggers several false window.onclick, window.onblur events when you click on a tab.
    Switching tabs via Ctrl+Tab does not fire additional events.

    Both Opera and Chrome trigger two onclick event when you open a new tab in background.
    It looks like a bug. I think it should be triggered only one time.
    Probably the first onfocus is the event that fire immediately after clicking and creating the tab in background.

    Chrome also loses a focus when you drag the tab.

    If you wanna test this by yourself

    To demonstrate it I used the userscript on http://example.com/
    Link to the userscript: https://pastebin.com/7Zsj4R7k