Does anyone has trouble using:
window.onblur = function(){doSomething();} with Mozilla/firefox 1.0?
Considering, my main page being some kind of image thumb gallery. When you click a thumb, javascript open a popup window that shows the image at big size. There are couple of buttons associate to js functions to navigate throught images : previous, next, last, first, back to thumbs with auto update main page...and a slideshow option. When slideshow activate (on/off button), you can still use all the nav buttons like last or first image, but it will automatically stop slideshow if you use the back to thumb gallery button. I want it to stop too if you just leave focus from popup window like watching another page or going back to thumb gallery without using the back to thumb button, so I used :
window.onblur = function(){stopSlideShow();} in the popup. It does work very well in IE or Opera, but in Firefox, when slideshow playing if I click any nav buttons, like going to first image, slideshow will just stop. It looks like clicking on the button, steal focus from the window and onblur launching stopSlideShow(). I'm sure the problem is coming from window.onblur but can't figure it out. I try using a timeout like this, but didn't worked either :
window.onblur = function(){killFocus=setTimeout('stopSlideShow();',20);}
then using clearTimeout(killFocus) in any function button related that could steal the focus.