Closed
Bug 247837
Opened 21 years ago
Closed 18 years ago
Trigger autocomplete options for url using down arrow key.
Categories
(Camino Graveyard :: Location Bar & Autocomplete, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.5
People
(Reporter: dirocco, Assigned: froodian)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 5 obsolete files)
5.03 KB,
patch
|
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040517 Camino/0.8b
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040517 Camino/0.8b
Say there are two pages that you like to visit on the same site. After visiting
the shorter one, like http://www.theweathernetwork.ca, and reading its content,
the user should be able to click the location bar and hit the down arrow key to
see more autocomplete options for the address that's already there, like
http://www.theweathernetwork.com/weather/cities/can/Pages/CAON0728.htm.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
I also tried this with the build labelled 2004061608 but didn't want to restart
my browser to copy the ID information.
Comment 1•21 years ago
|
||
To make sure I understand: the behavior you want is for clicking in the URL bar
to trigger autocomplete, rather than only doing it with typing (in order not to
have to delete a letter to get autocomplete)?
Comment 2•20 years ago
|
||
Indeed this would be a very helpful behavior. Don't know how many times a day I drag, click, erase and
choose an entry... simply clicking the current URL and seeing all relevant URL's would be great.
Confirming as harmless enhancment.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Display autocomplete options for urls that have been just been visited. → Triger autocomplete options for url using down arrow key.
Target Milestone: --- → Camino1.2
(In reply to comment #3)
> Confirming as harmless enhancment.
Harmless this most certainly is not....
This is a very bad idea for reasons of platform consistency. In Mac OS X single-line text fields, down arrow is the standard for "move the cursor to the end of the field".
This is one of the things I find most annoying about the Fx implementation, as I like to down-arrow and then start typing (i.e., at cb.o, down-arrow so I can add support/docs/proxy to the url).
Breaking platform conventions in some places and not others will confuse users and is really bad UI design/behavior; it's certainly not worth it here to save a few users *1* keystroke (to dirty the field before down-arrow works).
I'm not mortally opposed to adding a *different* keybinding to invoke autocomplete on the current (clean) url if this is really a warranted behavior (or even for a hidden pref, although I'd prefer a keybinding to hidden-pref-land), but our autocomplete behavior is the most sane, easy-to-use, and perfect of any brower I've ever tried, so I am very much opposed to changing the *default* behavior or breaking the standard text editing behaviors in a clean field.
(Note we've filed bug 329673, among others, to fix text behaviors so they behave properly elsewhere.)
Comment 5•19 years ago
|
||
I always type one character, just to get some results for the current page. Too bad we can't use the down-arrow, since that is most natural (as it is done in other browsers).
Does anyone have an idea of a near-intuitive key that would show autocompletion in this situation?
Updated•19 years ago
|
Summary: Triger autocomplete options for url using down arrow key. → Trigger autocomplete options for url using down arrow key.
Assignee | ||
Comment 6•19 years ago
|
||
Is there a good reason not to use cmd-down?
Assignee | ||
Comment 7•19 years ago
|
||
Assignee: mikepinkerton → stridey
Status: NEW → ASSIGNED
Attachment #230229 -
Flags: review?(stuart.morgan)
Comment 8•19 years ago
|
||
So... why is pressing command-down, which isn't at all discoverable and takes two hands to do, better than deleting the last character?
Comment 9•19 years ago
|
||
What about using the down arrow only when the cursor is at the end? Click at the end and press down, or click anywhere and press down twice, to get auto-completions.
Assignee | ||
Comment 10•19 years ago
|
||
This patch contains a very hackish bit of code in BrowserWindow.mm, which unfortunately I'm too tired to explain (it being 5:30 AM), but which luckily is documented pretty well.
Besides that, basically what we want to do is retain current behavior if the cursor isn't at the end of the location bar, or if the autocomplete options are already showing. This does exactly that.
Attachment #230229 -
Attachment is obsolete: true
Attachment #230313 -
Flags: review?(stuart.morgan)
Attachment #230229 -
Flags: review?(stuart.morgan)
Comment 11•18 years ago
|
||
Comment on attachment 230313 [details] [diff] [review]
Uses the down key to trigger autocomplete (when already at the end of location bar)
>+ // This is an ugly hack. For some unknown reason, |performKeyEquivalent:| is called twice for every down-arrow
>+ // keydown.
Once is keydown, once is keyup. You can just check for the event being a keydown instead of the hack.
Before getting into specifics of the rest: is there a reason this can't be done inside of AutoCompleteTextField?
Attachment #230313 -
Flags: review?(stuart.morgan) → review-
Assignee | ||
Comment 12•18 years ago
|
||
Thanks for figuring out why performKeyEquivalent was being called twice, it was really bugging me. Of course, now that this is in AutoCompleteTextField (and can use MoveDown:), it eliminates that problem... ;)
Attachment #230313 -
Attachment is obsolete: true
Attachment #232660 -
Flags: review?(stuart.morgan)
Assignee | ||
Updated•18 years ago
|
Attachment #232660 -
Flags: review?(stuart.morgan) → review?(hwaara)
Comment 13•18 years ago
|
||
Comment on attachment 232660 [details] [diff] [review]
Moves logic into AutoCompleteTextField
* Why are you modifying the string in the status bar (removing whitespace)?
* Please rename |startSearchWithDownArrow| to |maybeStartSearchWithDownArrow| to reflect its function better.
* I think your endOfBarIsSelected can be a simplified a bit by doing:
o Check if the length is 0 (no selection)
o Check if the location is the length of the string value of the textfield.
Attachment #232660 -
Flags: review?(hwaara) → review-
Comment 14•18 years ago
|
||
By "modifying the string" I mean: "modifying the string before you use it".
Assignee | ||
Comment 15•18 years ago
|
||
(In reply to comment #13)
> (From update of attachment 232660 [details] [diff] [review] [edit])
> * Why are you modifying the string in the status bar (removing whitespace)?
No good reason. Removed.
I also made a couple new whitespace changes, replacing tabs with spaces. Sorry for the clutter it introduces.
Attachment #232660 -
Attachment is obsolete: true
Attachment #235791 -
Flags: review?(hwaara)
Comment 16•18 years ago
|
||
Comment on attachment 235791 [details] [diff] [review]
Addresses hwaara's comments
Sorry, just some minor nits I caught now:
* You can simply return |endOfBarIsSelected|
* Please rename it to |caretIsAtEndOfBar| or something
* Also put a small comment above the method on what criteria it will trigger autocomplete
After that, you can mark the next patch r=me.
Attachment #235791 -
Flags: review?(hwaara) → review-
Assignee | ||
Comment 17•18 years ago
|
||
Attachment #235791 -
Attachment is obsolete: true
Attachment #235800 -
Flags: superreview?(mikepinkerton)
Attachment #235800 -
Flags: review+
QA Contact: location.bar
Comment 18•18 years ago
|
||
+- (BOOL) maybeStartSearchWithDownArrow;
there has got to be a better name for this method.
+ if(cursorIsAtEndOfBar) {
+ [self startSearch:[self stringValue] complete:YES];
space between |if| and paren.
Comment 19•18 years ago
|
||
(In reply to comment #18)
> +- (BOOL) maybeStartSearchWithDownArrow;
>
> there has got to be a better name for this method.
Another approach would be to make the method simply check if the caret is at the end of the line, and rename it accordingly (caretIsAtEndOfLine?)
Then invoke the autocomplete search in the other method (where you right now just call |maybeStartSearchWithDownArrow|.
Assignee | ||
Comment 20•18 years ago
|
||
This takes the approach in comment 19 (since I'd already renamed the method once, and if you're having to name a method three times, maybe it's a sign that you could be solving the problem more elegantly)
Attachment #235800 -
Attachment is obsolete: true
Attachment #236027 -
Flags: superreview?(mikepinkerton)
Attachment #235800 -
Flags: superreview?(mikepinkerton)
Comment 21•18 years ago
|
||
Comment on attachment 236027 [details] [diff] [review]
Patch
sr=pink
Attachment #236027 -
Flags: superreview?(mikepinkerton) → superreview+
Assignee | ||
Comment 22•18 years ago
|
||
Checked in on trunk and 1.8branch.
Comment 23•18 years ago
|
||
Moving fixed "1.2" bugs to 1.1 where they were really fixed. Filter on CaminoFixed1.1 for bugmail purposes.
Target Milestone: Camino1.2 → Camino1.1
You need to log in
before you can comment on or make changes to this bug.
Description
•