prepend http:// to URL copy selection only if (at least) full hostname is selected

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Location Bar
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldir, Assigned: dao)

Tracking

unspecified
Firefox 12
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
This issue was raised in comments to other bugs:
- bug 666964, comment 13
- bug 689342, comment 8
But neither bug tackled this issue directly, so those comments kinda drowned in the discussion surrounding the somewhat controversial hiding of the http:// from the location bar.

Thus I'm opening a bug specifically for this effect, since bug 666964, which got implemented, mentions adding the http:// "if the first character is included in the selection", and it seems straightforward to extend this to a slightly more rigid condition (and a more logical one): to add the http:// only if at least the full hostname is selected.
(Assignee)

Updated

6 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 1

6 years ago
Created attachment 582718 [details] [diff] [review]
patch
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #582718 - Flags: review?(gavin.sharp)
(Assignee)

Comment 2

6 years ago
Created attachment 582720 [details] [diff] [review]
patch

hopefully with proper English this time
Attachment #582718 - Attachment is obsolete: true
Attachment #582718 - Flags: review?(gavin.sharp)
Attachment #582720 - Flags: review?(gavin.sharp)
(Assignee)

Updated

6 years ago
Attachment #582720 - Flags: review?(dietrich)
Comment on attachment 582720 [details] [diff] [review]
patch

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

::: browser/base/content/test/browser_urlbarCopying.js
@@ +65,1 @@
>    },

worth adding a test for "<example>.com/foo"? or is that case covered elsewhere?

::: browser/base/content/urlbarBindings.xml
@@ +519,5 @@
> +          if (selectedVal.indexOf("/") == -1) {
> +            let remainder = inputVal.replace(selectedVal, "");
> +            if (remainder != "" && remainder[0] != "/")
> +              return selectedVal;
> +          }

please add a comment summarizing the criteria for determining whether the full domain has been selected or not.
Attachment #582720 - Flags: review?(dietrich) → review+
(Assignee)

Updated

6 years ago
Attachment #582720 - Flags: review?(gavin.sharp)
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d3dbf8ffab2
Flags: in-testsuite+
Target Milestone: --- → Firefox 12

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/6d3dbf8ffab2
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

6 years ago
Thanks guys, you are awesome :D
You need to log in before you can comment on or make changes to this bug.