Closed Bug 240799 Opened 21 years ago Closed 21 years ago

ctrl-enter on "domain/page" tries to open "www.domain/page.com"

Categories

(Firefox :: Address Bar, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 233853

People

(Reporter: ideal.wood2001, Assigned: noririty)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040412 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040412 Firefox/0.8 If you type "domain/page" in the location bar and press Ctrl+Enter, Firefox will complete it as "www.domain/page.com". I highly doubt this is the expected address for anyone. Same applies for .net and .org shortcuts. Reproducible: Always Steps to Reproduce: 1. Type in some address with a slash, like "mozilla/products/firefox" 2. Use an autocomplete shortcut, like Ctrl+Shift+Enter Actual Results: Firefox will attemp to open "www.mozilla/products/firefox.org" Expected Results: A smart solution would be complete the address as "www.mozilla.org/products/firefox". Just check for a slash, and complete the address before it.
Should this bug fall into the "trivial" category? The solution seems to be very simple.
*** This bug has been marked as a duplicate of 233853 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
David, this is not the same bug, since I'm talking about smartly interpreting addresses with slashes. I made the fix myself (see patch), but looks like WinMerge's patch format isn't what I expected. Anybody could help me on how to generate a patch? If you can use that one, it applies to mozilla/source/browser/base/content/browser.js. And my patch does not change anything related to bug 233853, btw.
Oh dang it, you submitted a patch while I was duping this one. Hang on and let me clean up this mess (next time please mention in the first report if you intend to attach a patch... :) ). They're not quite dupes but the two ought to be fixed at the same time.
Ok... let's reopen this one. Sorry for the spam (more to come).
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
I wasn't thinking of making a patch until I found out (through another ctrl-enter-related bug) that it could be solved through a javascript file, without searching through hundreds of C files or recompiling anything :)
Confirming, assigning to noririty. Related to bug 233853.
Assignee: bugs → noririty
Status: UNCONFIRMED → NEW
Ever confirmed: true
Daniel: I've reconstituted your patch in the usual cvs diff method. Please check that I got it right. If it is you should be able to request that noririty review it, although if you can't I can do that (or noririty can take notice and do it himself... :) ).
Attachment #146355 - Attachment is obsolete: true
Your remake is fine, I compared its diff to the one I have here.
Comment on attachment 146357 [details] [diff] [review] Remake of same patch Do we actually need the prefix variable? Can't that just be included at the end when the url variable is created? ie url = "http://www." + url + suffix + "/"; etc
Attachment #146357 - Flags: review?(noririty)
I added it just to make things as close to the old code as possible, and to offer some extensibility (you may want to add other prefixes, or a prefixless suffix). Though I don't see that happening, and I'd expect an extension to do that rather than the browser itself -- for example, one could make an extension that allows you to make country-specific completions, like binding shift-enter to www.*.co.uk, and ctrl-shift-enter to *.co.uk. So I agree it could be removed.
Comment on attachment 146357 [details] [diff] [review] Remake of same patch Cancelling review
Attachment #146357 - Flags: review?(noririty)
Reduping against bug 233853 where I'll attach a patch to fix this, that and something else all at once. *** This bug has been marked as a duplicate of 233853 ***
Status: NEW → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: