Comments (2)
HI
the demo is working well when i change Tab in a browser (chrome/firefox) but when i activate an other application, like notepad (or from firefox to chrome) there is no entry in the log? is there any way to detect that?
thanks rob
If you check out https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API you'll see there's a note that mentions the normal browser "focus" functionality;
Note: While onblur and onfocus will tell you if the user switches windows, it doesn't necessarily mean it's hidden. Pages only become hidden when the user switches tabs or minimizes the browser window containing the tab.
If you really want to check if a window/page is in focus, you can use those built-in events. Just remember that users with multiple monitors or non-fullscreen windows can still technically "see" the page (potentially), and handle accordingly!
from ifvisible.js.
Author responded to another similar issue here: #42 (comment)
There's a legacy mode you can use in a newer (not "released" yet) that you can utilize.
from ifvisible.js.
Related Issues (20)
- Disable Idle Check HOT 1
- Docs about how to use ifvisible.js on Angular 2 app? HOT 3
- Bug with Angular 2 HOT 2
- Project naming convention messes up my import using Typescript and Webpack
- Not working with alt+tab in windows HOT 2
- window 'blur' and 'focus' not handled HOT 1
- ifactive.js? HOT 1
- Activated on Page Load?
- ifvisible.OnEvery doesn't continue after switching tabs HOT 4
- IE9 : invalid calling object error
- Bind to new windows HOT 1
- switch to other web page on tab on chrome, idle event is trigger HOT 1
- Memory leak with idle checking HOT 4
- Idle fired incorrect HOT 3
- destroy events HOT 2
- How to use in Angular 7 HOT 1
- Incorrect TypeScript declarations HOT 1
- Latest version is not published as "latest" on NPM HOT 2
- No debounce is applied HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ifvisible.js.