Bug 704157 - bugzilla: don't reload show_bug page when returns to it via Back browser button
Summary: bugzilla: don't reload show_bug page when returns to it via Back browser button
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.6
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-12 09:53 UTC by Tomas Hoger
Modified: 2013-06-24 01:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-19 03:36:56 UTC


Attachments (Terms of Use)
greasemonkey "workaround" (262 bytes, text/plain)
2011-06-02 14:43 UTC, Tomas Hoger
no flags Details

Description Tomas Hoger 2011-05-12 09:53:44 UTC
Description of problem:
Following hack addressing some form refreshing bug on reload has a negative side effect:

    /* A bug/feature in Firefox exists where if you reload a page it will 
       cache some form field values but refresh others from the server,
       for example hidden fields. This script will force a full page reload
       if the reload button or context menu item is selected so that all 
       fields will have fresh data. The prior behaviour was causing certain
       changes such as flags to be overwritten unintentionally without 
       properly throwing a midair collision warning screen. */
    onload = function(){
        var e = document.getElementById("refreshed");
        if (e.value == "no") {
            e.value = "yes";
        } else {
            e.value="no";
            window.location.reload(true);
        }
    }

This reload also triggers when user returns back to the page using Back browser button.  As doing full reload takes some time, it can finish after you've done some edits to the page after returning to it, and hence it throws away your changes.  The above hack should not trigger when returning to the page.  Is there any reference with more info on the original problem?

Steps to Reproduce:
1. visit any show_bug.cgi page
2. follow any link in the bug (such as History)
3. press Back button and see how page is incorrectly reloaded

Comment 1 Tomas Hoger 2011-05-30 12:40:25 UTC
Increasing priority.  This can easily nuke your comment if you make an error in the CC field when adding comment and CC and you need to go back to make a correction.

Comment 2 Tomas Hoger 2011-06-02 14:43:29 UTC
Created attachment 502554 [details]
greasemonkey "workaround"

Comment 3 Jeff Fearn 🐞 2012-05-30 04:37:07 UTC
As part of the recent Bugzilla 2.4 upgrade the Bugzilla team are cleaning up bugs opened against old versions of Bugzilla. This bug has been flagged as an old bug and will be CLOSED WONTFIX in 7 days time.

If you believe this bug is an issue in the latest Bugzilla version please comment on this bug within 7 days. Doing so will ensure this bug is not closed automatically.

Thanks, the Bugzilla team.

Comment 4 Tomas Hoger 2012-05-30 08:21:14 UTC
Quick check of the html code generated by show_bug.cgi suggests that the evil reload is gone now.  I can't say if that is the feature or BZ 4.2 migration regression that will soon lead to complaints from the reporter of the bug that led to introduction of this reload hack.

If the hack is going to be re-added, please also keep this open.

Comment 7 Jeff Fearn 🐞 2012-07-19 03:36:56 UTC
AIUI this is upstream code and not overridden by RH. Unless it is changes upstream it isn't likely to be changed.


Note You need to log in before you can comment on or make changes to this bug.