document auto refresh in background tab's timers sometimes succeeds, but should be paused
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox-esr68 wontfix)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | wontfix |
People
(Reporter: lmironov, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.1 Lightning/5.8
Steps to reproduce:
- Go to http://livescores.worldsnookerdata.com/ and click on "live scores", but only when a match is on.
- Press android home button to move firefox into background
- Wait for 60+ seconds
- Return to firefox
Actual results:
"Server not found" firefox page is displayed
Expected results:
live scores should've been displayed. 68.1.1 The page in question is refreshed by the following code:
<script type="text/javascript">
function getUrlParameter(sParam) {
var sPageUrl = window.location.search.substring(1);
var sUrlVariables = sPageUrl.split('&');
for (var i = 0; i < sUrlVariables.length; i++) {
var sParameterName = sUrlVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
}
}
return null;
}
var targetRefresh = 60;
function refreshTimerDisplay() {
targetRefresh -= 1;
if (targetRefresh <= 0) {
var url = $(location).attr('pathname') + '?pos=' + $(document).scrollTop();
window.location.replace(url);
targetRefresh = 60;
}
$('#label-timer').html(targetRefresh);
}
if (getUrlParameter('pos') !== null) {
var scrollPos = parseInt(getUrlParameter('pos'));
window.scrollTo(0, scrollPos);
}
var tmrReloadPage = setInterval(refreshTimerDisplay, 1000);
</script>
Comment 1•5 years ago
|
||
Asking QA to also give this a test on Fenix Nightly.
Updated•5 years ago
|
correction to the step 1: ...go to http://livescores.worldsnookerdata.com/ and click on "MAIN MENU->live scores"...
Hi, I checked with the steps from description with Samsung Galaxy Tab A (Android 9) and Sony Xperia Z5 (Android 7.0) on Firefox Preview Nightly/Fenix Nightly 191016 (Build #12890612).
I did reproduce the issue but only with Sony Xperia Z5 (Android 7.0) after the second attempt but it does not seem to be something that is reproducible all the time.
Note:
Did not encounter the issue with Samsung Galaxy Tab A (Android 9) and Sony Xperia Z5 (Android 7.0) on Firefox Release 68.2.0 and Firefox Beta 68.2b7.
In my case it is 100% reproducible on caterpillar S61 with android 9, even with battery manager disabled and background execution allowed for firefox.
Comment 5•5 years ago
|
||
Asking the GV team to triage this. If this requires changes in the embedding application, please need info me and I will move this ticket to the Firefox Preview (Fenix) project. I doubt we will address this for Fennec, unless it is something that we would do in platform.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•5 years ago
|
||
This behavior is by design. We want to throttle or pause timers in background tabs to avoid background tabs from using up all your battery. That background tab timers work intermittently on some devices is the bug we should fix.
Comment 7•3 years ago
|
||
Need to check that this is still an issue.
Updated•3 years ago
|
Comment 8•3 years ago
|
||
This is not a problem anymore, the page freezes as expected, and the count down resumes when the page is brought back to the foreground.
Updated•2 years ago
|
Description
•