Closed Bug 754498 Opened 12 years ago Closed 6 years ago

Domain should not be highlighted in the address bar when the URL differs from the page

Categories

(Firefox :: Address Bar, defect)

defect
Not set
minor

Tracking

()

RESOLVED INACTIVE

People

(Reporter: MattN, Unassigned)

Details

Attachments

(2 files, 2 obsolete files)

Once the user changes the URL in the address bar, we shouldn't continue showing the identity info of the document's domain or highlight the newly entered domain name until it is navigated to.

See the attached screenshot that shows https://www.paypal.com with the address bar changed to www.ebay.com.  The highlighting of the domain makes it seem like it's important even thought it's not yet relevant for the displayed document.

I encounter this when I paste a URL or make other changes the address bar but then change tabs without navigating.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Bug 667586 didn't seem to cover the domain highlighting (colouring "ebay.com" darker than "www.") and so I'll change this bug into just that specific piece since I don't think the same implementation details apply.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Summary: Domain highlighting and lock/EV icons should not appear once the URL was edited (and not navigated to) → Domain should not be highlighted in the address bar when the URL differs from the page
Attached patch Patch for bug (obsolete) — Splinter Review
This patch checks for the exact URL match and also for the case where the trailing slash on a domain name is elided.
Attachment #625280 - Flags: review?(mnoorenberghe+bmo)
Status: REOPENED → ASSIGNED
Attached patch Patch for bug v2 (obsolete) — Splinter Review
This patch just checks pageproxystate, which will keep it consistent with our other showing/hiding of elements based on pageproxystate such as the bookmark star.
Attachment #625280 - Attachment is obsolete: true
Attachment #625280 - Flags: review?(mnoorenberghe+bmo)
Attachment #625282 - Flags: review?(mnoorenberghe+bmo)
Comment on attachment 625282 [details] [diff] [review]
Patch for bug v2

Review of attachment 625282 [details] [diff] [review]:
-----------------------------------------------------------------

This doesn't handle the case where you modify the URL bar and then switch to another tab and then switch back.

It also doesn't seem like UpdatePageProxyState is called enough since it won't reformat the addressbar I manually revert the URL.  It would also be good if UpdatePageProxyState did some normalization like you had in your first patch.
Attachment #625282 - Flags: review?(mnoorenberghe+bmo) → review-
Comment on attachment 625282 [details] [diff] [review]
Patch for bug v2

Review of attachment 625282 [details] [diff] [review]:
-----------------------------------------------------------------

Matthew, I don't fully understand your comment, but I recommend this approach because we should be consistent with the bookmark star's behavior and also the identity block once we fix bug 667586. Try observing the bookmark star's behavior through the following steps:
1. Focus the url bar.
2. Delete the last character of the url bar's value.
3. Unfocus the url bar.
4. Refocus the url bar.
5. Add back in that last character by typing it manually.
6. Press escape to revert the url bar.
Attachment #625282 - Flags: feedback+
Attached patch Patch for bug v3Splinter Review
Thanks for catching the issue with switching tabs. I've fixed it in this version.
Attachment #625282 - Attachment is obsolete: true
Attachment #625318 - Flags: review?(mnoorenberghe+bmo)
(In reply to Matthew N. [:MattN] from comment #0)
> I encounter this when I paste a URL or make other changes the address bar
> but then change tabs without navigating.

This seems like an edge case. I'd rather optimize for the common case of autocompleting or pasting a value and hitting Enter. Formatting the value once the location changed makes sense on a technical level, but it's not obvious to me how this delay actually improves the UI.
(In reply to Dão Gottwald [:dao] from comment #8)
> (In reply to Matthew N. [:MattN] from comment #0)
> > I encounter this when I paste a URL or make other changes the address bar
> > but then change tabs without navigating.
> 
> This seems like an edge case. I'd rather optimize for the common case of
> autocompleting or pasting a value and hitting Enter. Formatting the value
> once the location changed makes sense on a technical level, but it's not
> obvious to me how this delay actually improves the UI.

That's a good point. The cause is that we don't call onLocationChange immediately when the user presses Enter, because we don't repaint the content area immediately.

My tentative thinking is that we shouldn't take this fix unless we can avoid the delay that Dão described.
Then we should take version 2 of the patch and not worry about the tab switching scenario.
(In reply to Jared Wein [:jaws] from comment #10)
> Then we should take version 2 of the patch and not worry about the tab
> switching scenario.

That patch has the same downside.
Attachment #625318 - Flags: review?(mnoorenberghe+bmo) → review-
Assignee: jaws → nobody
Status: ASSIGNED → NEW
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 12 years ago6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: