Closed Bug 1379927 Opened 7 years ago Closed 7 years ago

about:networking isn't auto refreshed after restoring session

Categories

(Core :: Networking, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: michal, Assigned: valentin)

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

After restoring session, the page about:networking#rcwn doesn't auto refresh when autorefresh is checked. The "refresh" button is enabled. Auto-refreshing starts working after re-enabling it or after switching to another tab in about:networking. In the latter case the "refresh" button is still enabled.
MozReview-Commit-ID: 8DdhaEm88Nb
Attachment #8885288 - Flags: review?(jaws)
Assignee: nobody → valentin.gosu
Whiteboard: [necko-active]
Comment on attachment 8885288 [details] [diff] [review] Make sure init gets called when about:networking is loaded from the bfcache Review of attachment 8885288 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/aboutNetworking.js @@ +437,5 @@ > }, {once: true}); > > +window.onunload = function() { > + // We need this to ensure that init is called when the page is loaded > + // from the bfcache. Can you use "pageshow" and "pagehide" instead? Using "onunload" disables the bfcache making it slower to go back and forward etc.
Attachment #8885288 - Flags: review?(jaws) → review-
Attachment #8885288 - Attachment is obsolete: true
Comment on attachment 8885531 [details] [diff] [review] Make sure init gets called when about:networking is loaded from the bfcache Review of attachment 8885531 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/content/aboutNetworking.js @@ +435,5 @@ > +// We use the pageshow event instead of onload. This is needed because sometimes > +// the page is loaded via session-restore/bfcache. In such cases we need to call > +// init() to keep the page behaviour consistent with the ticked checkboxes. > +// Mostly the issue is with the autorefresh checkbox. > +window.addEventListener("pageshow", function() { pageshow can be called multiple times, for example switching away and back to this tab. Can you add an early return to init() in the case that init() was already called?
Attachment #8885531 - Flags: review?(jaws) → review+
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/50bb4bb1902f Make sure init gets called when about:networking is loaded from the bfcache r=jaws
https://hg.mozilla.org/integration/mozilla-inbound/rev/50bb4bb1902f84a7335754f62e7a124ca9b5c732 Bug 1379927 - Make sure init gets called when about:networking is loaded from the bfcache r=jaws
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: