ehynds / jquery-idle-timeout

Notify your users when their sessions are about to expire.
259 stars 106 forks source link

suspend when iframe is open? #8

Open chrisl91 opened 11 years ago

chrisl91 commented 11 years ago

Any recommendations on how to handle when the timer is running on a page and the user triggers an action that opens an iframe window? The idle warning always displays when the iframe is open because it is looking for "activity" on the parent page which never happens. Ideally I'd like to disable or suspend the timer on the parent page and have it run on the iframe window when the iframe is open. Thanks.

chrisl91 commented 11 years ago

I think I've found a solution. When opening the iframe, get the "idleTimerObj" from the cache and set enabled=false. On close of the iframe, get the timer object and set enabled=true. Seems to be working.

nawarkhede commented 10 years ago

@chrisl91 hey thanks , I was having same issue , fixed. Thanks. ;)