JavaScript: blur event on window

  • I've implemented:

    window.addEventListener("blur", blurBodyHandler, false);

    in my JavaScript and when an element in IFrame takes focus my event handler is triggered. In WebKit browsers. Not so in Opera browser on my Smart TV. I've tried:

    window.onblur = function(){}

    to no avail. I've tried attaching "focus" event listener to IFrame but had no luck with that either.

    However, adding event listeners on "DOMContentLoaded" and "keydown" works just fine.

Log in to reply
 

Looks like your connection to Opera forums was lost, please wait while we try to reconnect.