Closed Bug 673528 Opened 14 years ago Closed 14 years ago

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

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 9
Tracking Status
firefox7 --- fixed
firefox8 --- fixed

People

(Reporter: Gavin, Assigned: dao)

References

Details

(Whiteboard: [switch-to-tab])

Attachments

(1 file)

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*$/
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
Attached patch patchSplinter Review
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)
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
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)
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],
(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.
(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...
Attachment #549388 - Flags: ui-review?(faaborg)
Attachment #549388 - Flags: ui-review?(faaborg) → ui-review+
Attachment #549388 - Flags: review?(sdwilsh)
Attachment #549388 - Flags: review?(sdwilsh)
Attachment #549388 - Flags: review?(gavin.sharp)
Attachment #549388 - Flags: review+
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 :(
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 9
Dao, can we get a risk assessment on this? Is it fairly self contained?
(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+
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
Depends on: 688395
Blocks: 871519
No longer blocks: 871519
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: