Bug 1853643 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

+++ This bug was initially created as a clone of Bug #1848715 +++

### Steps to reproduce

1. Set `browser.urlbar.trimHttps` = `true`.
2. Open https://www.example.com/
3. Click focus to the address bar. You will be editing the string `www.example.com` instead of `https://www.example.com/`. Expanding the edited string to the full URL, `https://www.example.com/`, like Chrome would fix this bug.
4. Edit the URL, such as changing `.com` to `.net`.
5. Ctrl+A and Ctrl+ C to select all and copy the URL text.
6. Pass the copied URL in another tab or app.

### Expected results

`https://www.example.net/` like in Chrome.

### Actual results

`www.example.net`

This behavior happens with http:// URLs when `browser.urlbar.trimHttps` = `false`, but when this behavior affects https:// URLs, it can happen on many more websites.
Say I'm connected to `https://192.168.0.1:1234`. 

With `trimHttps` enabled, the address bar only displays `192.168.0.1:1234` but copying the entire location actually copies `https://192.168.0.1:1234`. This is fine.

However, when I then edit the location to say `192.168.0.1:12345` and press enter, it interprets this as `http://192.168.0.1:12345` instead of the `https://192.168.0.1:12345` I expected.

`https_first` and `https_only` modes do not help. I suppose IP:Port addresses are excluded here.

Back to Bug 1853643 Comment 0