4

I have a modal dialog popup being called from a parent window after 30 seconds of launch.

The modal window then closes automatically after 10 seconds of its launch.

The problem is when the parent window tab is inactive the modal window launches but does not seem to register due to which the timer on the modal is not triggered and it never closes.

Once I click on the flashing inactive tab the timer kicks off and the modal window then times out after 10 seconds.

I must user modal window as one of my requirement is to notify the user about idle time when the browser session is idle.

Can someone help?

Prattitude
  • 41
  • 2
  • 1
    I have the same question. Any help would be great ha! – Jamie Oct 15 '12 at 15:15
  • 3
    Not all browsers continue executing javascript in inactive tabs, or they may do so but at a significantly lower priority, causing delays. Chrome, for example, only allows a setInterval timer to execute once per second in an inactive tab. Is this possibly the kind of issue you're facing? It may help to explain more precisely what you mean by 'modal dialog', because it sounds like you're opening a pop-up window(?). I recommend adding the code that launches the new window / dialog and that sets the timer. – Semicolon Oct 16 '12 at 07:10
  • Can you add a http://jsfiddle.net? – Jamie Mason Feb 11 '13 at 20:42
  • It may help: http://stackoverflow.com/questions/5927284/how-can-i-make-setinterval-also-work-when-a-tab-is-inactive-in-chrome – Talysson Nov 22 '13 at 16:30

0 Answers0