-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Allow disabling refresh on tab focus #2484
Comments
|
Sorry, bro, I don't understand what is your problem, can u give me more explanations or offer some video to demonstrate your problem? |
Hello, |
I'm going to check the page lifecycle, it seems browsers freeze/discard tabs aggresively or we've a bug in the logic. We need to control those events to close all indexed db connections and control user account switch: |
Nope.
Or a feature. But I just want the ability to disable it. Thanks |
From the page lifecycle, Frozen state in the table:
and some more inputs:
and from unload event, maybe we need to include some protection with the
|
I assure you it's none of that. But in the meantime, I noticed that installing the Disable Page Visibility API extension is a workaround that disables this behavior. So I went after related listeners and found this : Line 102 in 1ff1395
I'm pretty sure this is it. |
The listener is added on demand and only when the account changes: keeping both tabs in sync (it is inside a watcher). This issue seems to be about loading the new page content, the problem here is the tab visibility, there are some My previous comments was about switching tabs, from time to time there is a page reload, releted to page lifecycle plugin logic, sorry for the noise. |
Maybe the refreshed tab is triggered by this hook in [status].vue and index.vue component. onReactivated(() => {
// Silently update data when reentering the page
// The user will see the previous content first, and any changes will be updated to the UI when the request is completed
refreshStatus()
refreshContext()
}) |
this is not true, it also is added on the first login. i tested and signing out of Elk makes the bug go away (i.e. switching back to the tab becomes instant). maybe you intended to reload only when the user is changed, not each time the tab gains or loses focus? i can make a PR with that change. |
There is a bug in 0.15.0 version, should be fixed in main elk.zone, we need a new release to fix the page refresh. |
hmm, i am also seeing the bug in my local copy of elk.zone built from 54344ac. |
oh i see, you just merged a fix 8 hours ago. yes, with that branch the bug is fixed :) sorry for the noise |
We released v0.15.1 and it should be available at https://elk.zone/. The new version includes some reloading issue fixes by #2975. |
Hello,
I often do the following :
What I expect is : being able to read the post immediately.
What I experience is : needing to wait for the page to refresh while it already had plenty of time to load in the first place.
Please allow disabling this behavior.
Thanks
The text was updated successfully, but these errors were encountered: