-
-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: handled idle incorrect #28
Comments
Same here! I think that is pretty confusing if designed like this. |
Yes the code is directly firing the idle event when blurred. Below is a workaround that will give you some mileage. var idleInfo = ifvisible.getIdleInfo();
if (!idleInfo.isIdle) {
return;
} A good fix could be to have a set method that enable/disables this behaviour. |
thanks for the answer, handled this case myself in the meantime. I agree, exposing this as a configureable setting would be really making this library complete. |
Just ran into this issue, can't believe it hasn't been fixed since this issue was started over half a year ago. @prabhu response works, but if you tab out, you will never be counted as idle. This will only work if you stay tabbed in. @serkanyersen are you aware of this? EDIT: I managed to fix it. Under |
Just fixed this issue in master. there was a minor race condition, and one of the timeouts were not clearing properly. it's all resolved now. |
@serkanyersen did you test it? That didn't fix it for me. |
if you are testing this on demo site, that's not updated yet. |
I am not. I downloaded both the js and min js to test, and both don't work. |
Wait I think I closed the wrong issue :/ I'll work on this one as well. sorry about that |
Please take time with your fix. Ideally we would like to review the fix if possible since I feel this library is quite flaky as it is. |
I'm actually porting the library into Typescript at the moment #33 . Which is going to be much more robust. I'll also have plenty of unit tests on that port. Most of the bugs and low maintenance of this library happens because of coffee script. That was a bad choice :/ |
I can't seem to recreate this issue. Can someone give me step by step? Also please checkout my comment on #38 any help is appreciated. Maybe V2 has solved this issue, I'm not sure. Thanks |
ifvisible.js prevent blur to trigger idle event as below |
If switch between tabs, any time I get "idle"
if the time has not come: I expected get "focus" not "idle"
Example of code:
The text was updated successfully, but these errors were encountered: