user selection in URL bar is not respected during page loads



Camino Graveyard
Location Bar & Autocomplete
12 years ago
8 years ago


(Reporter: Josh Aas, Unassigned)




(1 attachment, 1 obsolete attachment)

3.60 KB, patch
Stuart Morgan
: review-
Details | Diff | Splinter Review


12 years ago
Steps to reproduce:

1. Have camino set to load a home page when opening a new window
2. Hit command-n to open a new window
3. Immediately hit command-l to select all text in the URL bar

Actual result:

If you let the home page continue loading after hitting command-l, it will wipe out the selection you just made. If you planned on typing a new URL, you'll now be typing in the wrong place.

Expected result:

Respect my selection and don't wipe it out when the page completes. Currently any *typing* in the URL bar is respected as user interaction, but not selection.

Comment 1

12 years ago
Created attachment 252853 [details] [diff] [review]
fix v1.0
Attachment #252853 - Flags: review?(stuart.morgan)

Comment 2

12 years ago
Comment on attachment 252853 [details] [diff] [review]
fix v1.0

This doesn't respect most selection, just the case of Command-L; we should be consistent about calling selection a user action.

I think the better approach would be to check if there is a field editor, if so see if there is a non-zero range, and use that to decide.
Attachment #252853 - Flags: review?(stuart.morgan) → review-

Comment 3

12 years ago
Created attachment 252936 [details] [diff] [review]
fix v2.0
Attachment #252853 - Attachment is obsolete: true


12 years ago
Attachment #252936 - Flags: review?(stuart.morgan)

Comment 4

12 years ago
Comment on attachment 252936 [details] [diff] [review]
fix v2.0

Code looks good, but as I feared it's overly-aggressive. For example, if I focus the URL bar, then change my mind and use a bookmark, the URL bar stays focused, which didn't happen before the patch.

Either it needs to ignore empty selections, or the clients of this method need to ignore what it says more often than they currently do.
Attachment #252936 - Flags: review?(stuart.morgan) → review-


10 years ago
Assignee: joshmoz → nobody
You need to log in before you can comment on or make changes to this bug.