N
nutso fasst
Perhaps this will be useful to someone...
I have a page with a document.onkeypress handler that uses
window.onblur/onfocus events to stop/start an interval timer. In IE 5,
clicking on a DIV with CSS 'position: absolute' fires a window.onblur event.
Subsequently clicking outside the DIV won't fire the window.onfocus event.
If I switch to another window and then back to the window in question, the
onfocus event fires, but the onblur event fires immediately after.
Consequently, neither the interval timer nor the keypress handler will
restart without a page reload.
The fix for this is to add an onfocus handler to the DIV element:
<div onfocus="this.blur()">
The likelyhood of someone accidently clicking on the DIV may be low, but
folks do sometimes click a visible portion of a window to give it focus and
I don't want any of them getting frustrated.
nf
I have a page with a document.onkeypress handler that uses
window.onblur/onfocus events to stop/start an interval timer. In IE 5,
clicking on a DIV with CSS 'position: absolute' fires a window.onblur event.
Subsequently clicking outside the DIV won't fire the window.onfocus event.
If I switch to another window and then back to the window in question, the
onfocus event fires, but the onblur event fires immediately after.
Consequently, neither the interval timer nor the keypress handler will
restart without a page reload.
The fix for this is to add an onfocus handler to the DIV element:
<div onfocus="this.blur()">
The likelyhood of someone accidently clicking on the DIV may be low, but
folks do sometimes click a visible portion of a window to give it focus and
I don't want any of them getting frustrated.
nf