Skip to content
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

isIdle for All Tabs #45

Open
Kamran95 opened this issue Jun 25, 2020 · 5 comments
Open

isIdle for All Tabs #45

Kamran95 opened this issue Jun 25, 2020 · 5 comments

Comments

@Kamran95
Copy link

Kamran95 commented Jun 25, 2020

i am facing a problem while implementing in my whole project.
isIdle works fine when my project is opened in single tab but when i open my project on second tab and no one is working on that tab isIdle value gets true whereas it should be false as user is working on the other tab of the project
How may i make it possible that if user is working on one tab of a site isIdle state must be false for all other tabs as well.
i am getting state by following
import store from './store'
Vue.use(IdleVue, { store})

const vm = new Vue({
store,
computed: {
messageStr() {
return this.isAppIdle ? 'ZZZ' : 'Hello'
}
}
})
putting condition on
$store.state.idleVue.isIdle

@mohmmedwee
Copy link

,

@atiar-cse
Copy link

Same issue - when using multi tabs. While I am active in a tab other idle tabs goes expired....

@mueed-sarzil
Copy link

Same issue - when using multi tabs.

@mohmmedwee
Copy link

based on what I understand, SPA is handling tabs like a new app, but you could share information/computing by using workers.

Shared Workers

@gabrielstuff
Copy link
Member

Hello,

What are you talking about exactly ? The lib only watch for non-activity on one tab. If you have multiple tabs open it means multiple app. You can share information between your app on multiple tabs with things like : https://engineering.wingify.com/across-tabs/live-demo.html or http://localsync.js.org/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants