The default bug view has changed. See this FAQ.

using Shift to bypass "switch to tab" doesn't work anymore (loads www.domain.com.net)

VERIFIED FIXED in Firefox 7

Status

()

Firefox
Location Bar
VERIFIED FIXED
6 years ago
4 years ago

People

(Reporter: Gavin, Assigned: dao)

Tracking

Trunk
Firefox 9
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox7 fixed, firefox8 fixed)

Details

(Whiteboard: [switch-to-tab])

Attachments

(1 attachment)

Bug 665580 means that the URL we try to load no longer matches the "URL-like" test in _canonizeURL, so it gets a .net added to it.

STR:
1) Load http://gavinsharp.com/geo.html
2) open new tab, type "gavinsharp.com", notice "switch to tab" entry
3) Press shift to override "switch to tab" (bug 596485), press enter

Expected: http://gavinsharp.com/geo.html loads again.
Actual: www.gavinsharp.com.net/geo.html loads
Whiteboard: [switch-to-tab]
This regex is confusing (as most regexes are). I have no idea why it's trying to match what it is.
 
/^\s*(www|https?)\b|\/\s*$/
(Assignee)

Comment 2

6 years ago
Looks like it just tests if the value starts with www. or http: or https:. (I'm not sure about the purpose of |\/.) *Why* it defines URL-likeliness like this is an interesting question, though.
Component: General → Location Bar
Depends on: 668019
QA Contact: general → location.bar
(Assignee)

Comment 3

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

Changed the heuristics to reject foo.bar, which I suspect has a high failure rate. www.foo.bar.net *could* be wanted, but these domains seem rare to start with. I happen to trigger this quite often accidentally.
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #549388 - Flags: review?(gavin.sharp)
(Assignee)

Comment 4

6 years ago
This also changes behavior for other stuff that's not switch-to-tab related, like "foo bar", which always tries to load a broken URL right now.
No longer depends on: 668019
(Assignee)

Updated

6 years ago
Summary: using Shift to bypass "switch to tab" doesn't work anymore (loads domain.com.net) → using Shift to bypass "switch to tab" doesn't work anymore (loads www.domain.com.net)
(Assignee)

Comment 5

6 years ago
Comment on attachment 549388 [details] [diff] [review]
patch

unchanged behavior:

>+  ["example", "http://www.example.net/"],
>+  ["ex-ample", "http://www.ex-ample.net/"],
>+  ["  example ", "http://www.example.net/"],
>+  [" example/foo ", "http://www.example.net/foo"],
>+  [" example/foo bar ", "http://www.example.net/foo%20bar"],
>+  ["http://example", "http://example/"],

changed behavior:

>+  ["example.net", "http://example.net/"],
>+  ["example:8080", "http://example:8080/"],
>+  ["ex-ample.foo", "http://ex-ample.foo/"],
>+  ["example.foo/bar ", "http://example.foo/bar"],
>+  ["1.1.1.1", "http://1.1.1.1/"],
>+  ["ftp://example", "ftp://example/"],
>+  ["ftp.example.bar", "ftp://ftp.example.bar/"],
>+  ["ex ample", Services.search.originalDefaultEngine.getSubmission("ex ample").uri.spec],
(Assignee)

Comment 6

6 years ago
(In reply to comment #3)
> I happen to trigger this quite often accidentally.

I've been thinking about how exactly this happens to me. I think it's when I paste something (Ctrl+V) and hit enter immediately.
(Assignee)

Comment 7

6 years ago
(In reply to Dão Gottwald [:dao] from comment #6)
> (In reply to comment #3)
> > I happen to trigger this quite often accidentally.
> 
> I've been thinking about how exactly this happens to me. I think it's when I
> paste something (Ctrl+V) and hit enter immediately.

And I just managed to hit Shift+Enter when I just wanted Enter...
(Assignee)

Updated

6 years ago
Attachment #549388 - Flags: ui-review?(faaborg)
Attachment #549388 - Flags: ui-review?(faaborg) → ui-review+
(Assignee)

Updated

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

Updated

6 years ago
Attachment #549388 - Flags: approval-mozilla-beta?
Attachment #549388 - Flags: approval-mozilla-aurora?
(In reply to Dão Gottwald [:dao] from comment #6)
> I've been thinking about how exactly this happens to me. I think it's when I
> paste something (Ctrl+V) and hit enter immediately.

To me happens regularly after a paste, looks like it takes a bit more for my finger to leave CTRL before I press ENTER, and I end up with CTRL+ENTER that forces a fixup :(
(Assignee)

Comment 9

6 years ago
http://hg.mozilla.org/mozilla-central/rev/6dc468c41136
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
status-firefox7: --- → affected
status-firefox8: --- → affected
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9

Comment 10

6 years ago
Dao, can we get a risk assessment on this? Is it fairly self contained?
(Assignee)

Comment 11

6 years ago
(In reply to Christian Legnitto [:LegNeato] from comment #10)
> Dao, can we get a risk assessment on this? Is it fairly self contained?

It's self contained -- this code only runs when hitting Accel/Shift+Enter in the location bar. It's also mostly code removal. The one line that's really new (the regular expression) is covered by a test.
Comment on attachment 549388 [details] [diff] [review]
patch

Land it on both aurora and beta soon, please!
Attachment #549388 - Flags: approval-mozilla-beta?
Attachment #549388 - Flags: approval-mozilla-beta+
Attachment #549388 - Flags: approval-mozilla-aurora?
Attachment #549388 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 13

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/85de577ce6a4
http://hg.mozilla.org/releases/mozilla-beta/rev/8c46db2bd827
status-firefox7: affected → fixed
status-firefox8: affected → fixed
Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (Windows NT 6.1; rv:9.0a1) Gecko/20110823 Firefox/9.0a1

After following the steps in the description, i can tell that both beta and Nigthly Firefox works as expected(after pressing shift,FF switches to tab without loading the page).
Setting resolution to Verified Fixed.
Thanks.
Status: RESOLVED → VERIFIED
(Assignee)

Updated

6 years ago
Depends on: 688395
Blocks: 871519
(Assignee)

Updated

4 years ago
No longer blocks: 871519
You need to log in before you can comment on or make changes to this bug.