Bug 1657237 - Address Bar flashes punycode when loading page.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D192696
This commit is contained in:
@@ -2762,12 +2762,18 @@ export class UrlbarInput {
|
||||
) {
|
||||
// No point in setting these because we'll handleRevert() a few rows below.
|
||||
if (openUILinkWhere == "current") {
|
||||
// Make sure URL is formatted properly (don't show punycode).
|
||||
let formattedURL = url;
|
||||
try {
|
||||
formattedURL = new URL(formattedURL).URI.displaySpec;
|
||||
} catch {}
|
||||
|
||||
this.value =
|
||||
lazy.UrlbarPrefs.get("showSearchTermsFeatureGate") &&
|
||||
lazy.UrlbarPrefs.get("showSearchTerms.enabled") &&
|
||||
resultDetails?.searchTerm
|
||||
? resultDetails.searchTerm
|
||||
: url;
|
||||
: formattedURL;
|
||||
browser.userTypedValue = this.value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user