[ZBX-6403] Remember position on refresh Created: 2013 Mar 17 Updated: 2017 Dec 15 Resolved: 2017 Dec 15 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Marc | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 3 |
Labels: | latestdata, patch, refresh, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Linux, CentOS-6.3, PostgreSQL 9.1.8, Apache HTTPD-2.2.15, PHP-5.3.3 |
Attachments: | main.js.patch | ||||||||||||
Issue Links: |
|
Description |
Just noticed a small flaw. It would be nice if it's possible to remember the position on automatic refresh like it is already done (probably by the browser) on manual refreshes. |
Comments |
Comment by Andrei Gushchin (Inactive) [ 2013 Mar 17 ] |
I confirm this. also in trunk has the same problem. |
Comment by richlv [ 2013 Mar 17 ] |
hmm. trunk r34416 - automatic refresh stays where i was scrolled (using opera 12.14). |
Comment by Andrei Gushchin (Inactive) [ 2013 Mar 17 ] |
Yes correct trunk is r34416. I check in firefox 19.0.2 and chrome 25.0.1364.172 m. Both have this problem. |
Comment by richlv [ 2013 Mar 17 ] |
ah, interesting - it's browser specific. |
Comment by richlv [ 2013 Apr 30 ] |
probably regressed from |
Comment by Adam Sajner [ 2015 Mar 10 ] |
Hi, I just revert code from older rev, where was code working. Attached patch is for file /trunk/frontends/php/js/main.js. |
Comment by Marc [ 2015 Mar 10 ] |
puresoul, can you add a real patch instead of a regular diff? diff -u ./js/main.js.orig ./js/main.js The only relevant difference i see is the replacement of location.replace() by location.reload(). Anyhow, I've probably overseen something since replacing the mentioned function didn't changed anything to me. |
Comment by Adam Sajner [ 2015 Mar 10 ] |
ver. for patch replaced, thanks for suggestion |
Comment by Marc [ 2015 Mar 11 ] |
It seams that location.reload() indeed does the trick: --- ./js/main.js.orig 2015-03-10 16:07:46.000000000 +0100 +++ ./js/main.js 2015-03-11 17:47:31.000000000 +0100 @@ -74,7 +74,7 @@ this.delayLeft -= 1000; if (this.delayLeft < 0) { - location.replace(location.href); + location.reload(); } else { this.timeout = setTimeout('PageRefresh.check()', 1000); Edit: Edit: |
Comment by Adam Sajner [ 2015 Mar 11 ] |
I'm pretty happy that it may fix this old "regression". EDIT: as you suggest |
Comment by Marc [ 2015 Mar 11 ] |
i'm not sure whether location.reload() will cause a performance impact in the context of |
Comment by Adam Sajner [ 2015 Mar 11 ] |
I'm not web developer or web expert, but as this frontend issue arise some time ago, I only want to share my knowledge. |
Comment by richlv [ 2016 Feb 22 ] |
|
Comment by Valdis Murzins [ 2017 Dec 15 ] |
Closing as duplicate of |