-
Notifications
You must be signed in to change notification settings - Fork 975
Commit
Fix #3928 Fix #3927 Auditors: @bridiver Test Plan: Same as #3857 but also make sure that entering a URL like nytimes.com in the URL bar does not show a blank location before the page is done loading.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ const debounce = require('../lib/debounce.js') | |
const getSetting = require('../settings').getSetting | ||
const config = require('../constants/config') | ||
const settings = require('../constants/settings') | ||
const { aboutUrls, isSourceAboutUrl, isTargetAboutUrl, getTargetAboutUrl, getBaseUrl, isNavigatableAboutPage } = require('../lib/appUrlUtil') | ||
const { aboutUrls, isSourceAboutUrl, isTargetAboutUrl, getSourceAboutUrl, getTargetAboutUrl, getBaseUrl, isNavigatableAboutPage } = require('../lib/appUrlUtil') | ||
const { isFrameError } = require('../lib/errorUtil') | ||
const locale = require('../l10n') | ||
const appConfig = require('../constants/appConfig') | ||
|
@@ -852,6 +852,12 @@ class Frame extends ImmutableComponent { | |
}) | ||
windowActions.loadUrl(this.frame, 'about:error') | ||
appActions.removeSite(siteUtil.getDetailFromFrame(this.frame)) | ||
} else { | ||
const currentLocation = this.webview.getURL() | ||
if (currentLocation !== e.validatedURL) { | ||
windowActions.setUrl(isTargetAboutUrl(currentLocation) | ||
This comment has been minimized.
Sorry, something went wrong.
bridiver
Collaborator
|
||
? getSourceAboutUrl(currentLocation) : currentLocation, this.props.frameKey) | ||
} | ||
} | ||
} | ||
this.webview.addEventListener('load-commit', (e) => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -596,12 +596,20 @@ describe('navigationBar', function () { | |
yield this.app.client.keys('\uE007') | ||
}) | ||
|
||
it('sets location to new URL immediately', function * () { | ||
This comment has been minimized.
Sorry, something went wrong.
bridiver
Collaborator
|
||
yield this.app.client | ||
.waitUntil(function () { | ||
return this.getValue(urlInput).then((val) => { | ||
return val === 'https://bayden.com/test/redir/goscript.aspx' | ||
}) | ||
}) | ||
}) | ||
|
||
it('clears urlbar if page does not load', function * () { | ||
This comment has been minimized.
Sorry, something went wrong.
bridiver
Collaborator
|
||
yield this.app.client | ||
.waitUntil(function () { | ||
return this.getValue(urlInput).then((val) => { | ||
console.log('value', val) | ||
return val === '' | ||
return val.endsWith('/about-newtab.html') | ||
}) | ||
}) | ||
}) | ||
|
1 comment
on commit 3ff17ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is causing problems for onepassword4-extension://activate/Chrome
. If onepassword mini is closed, https://agilebits.com/browsers/welcome.html opens up and reloads endlessly
long-term we want to move away from setter actions to descriptor actions
setUrl
->loadFailed
, but since the rest of this code uses setter actions this seems fine