From e25fc585d7647d7a3a81f002b0b74424fbdd3a2d Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Wed, 26 Oct 2016 23:41:43 -0400 Subject: [PATCH] Handle reload by setUrl in window store fix #5177 Auditors: @bbondy Test Plan: 1. Type brave.123 in navigation bar 2. After DNS error page is presented, click refresh button next to navigation bar 3. The error page refresh normally 1. Type brave.123 in navigation bar 2. After DNS error page is presented, click "Retry the URL" in error page 3. The error page refresh normally 1. Navigate to https://expired.badssl.com/ 2. After cert error page is presented, click refresh button next to navigation bar 3. The error page refresh normally 1. Navigate to https://expired.badssl.com/ 2. After cert error page is presented, click "Retry the URL" in error page 3. The error page refresh normally 1. Make network unavailable 2. Type anything in navigation bar 3. After connection error page is presented, click refresh button next to navigation bar 4. The error page refresh normally 1. Make network unavailable 2. Type anything in navigation bar 3. After connection error page is presented, click "Retry the URL" in error page 4. The error page refresh normally 1. Make network unavailable 2. Type anything in navigation bar 3. After connection error page is presented, make network available 4. Click refresh button next to navigation bar 5. The original page should load 1. Make network unavailable 2. Type anything in navigation bar 3. After connection error page is presented, make network available 4. Click "Retry the URL" in error page 5. The original page should load --- js/components/frame.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/components/frame.js b/js/components/frame.js index dfbfa990561..c8595a28afa 100644 --- a/js/components/frame.js +++ b/js/components/frame.js @@ -458,8 +458,11 @@ class Frame extends ImmutableComponent { // In this case both the user display and the user think they're on this.props.location. if (this.webview.getURL() !== this.props.location && !this.isAboutPage()) { this.webview.loadURL(this.props.location) - } else if (this.isIntermediateAboutPage()) { - this.webview.loadURL(this.props.aboutDetails.get('url')) + } else if (this.isIntermediateAboutPage() && + this.webview.getURL() !== this.props.location && + this.webview.getURL() !== this.props.aboutDetails.get('url')) { + windowActions.setUrl(this.props.aboutDetails.get('url'), + this.props.aboutDetails.get('frameKey')) } else { this.webview.reload() }