Closed
Bug 255116
Opened 20 years ago
Closed 19 years ago
Pressing Home or Shift+Home should close autocomplete
Categories
(Firefox :: Address Bar, defect)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
Firefox1.5
People
(Reporter: jruderman, Assigned: jruderman)
References
Details
(Keywords: dataloss)
Attachments
(1 file, 1 obsolete file)
2.53 KB,
patch
|
mconnor
:
review+
mconnor
:
approval1.8b4+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Ctrl+L.
2. Type part of a URL.
3. Down. (select first autocomplete entry)
4. Shift+Home. (select to beginning of line)
5. Shift+Delete. (cut)
Result: The autocomplete entry is removed.
Expected: The selection is placed on the clipboard (and deleted from the address
bar).
I hit this several times in a row before figuring out what was going on.
thanks,
that helped me to delete some entries in my autocomplete-list
I think that is not a bug.
Assignee | ||
Comment 2•20 years ago
|
||
Joerg: can you elaborate? How did the ability to remove autocomplete entries
after editing them help?
Comment 3•20 years ago
|
||
The problem here is that Shift-Delete is an old DOS equivalent for "Cut" or
Ctrl+X. That shortcut is used to delete the entry and not cut the url to the
clipboard. Whether or not this is worth fixing is debatable IMO, as relatively
few use the old Shift+Del for cut.
Assignee | ||
Comment 4•20 years ago
|
||
Gavin, that's not the problem. The problem is that Shift+Delete still deletes
the autocomplete entry *after* you perform selection/editing comments on the
autocompleted URL.
Comment 5•20 years ago
|
||
Reading comment 0, I think my interpretation is correct. The reporter expected
that "The selection is placed on the clipboard", where the selection is the
selected URL text. He was expecting it to be a regular "cut" of the URL, and got
a deleted autocomplete entry instead.
Comment 6•20 years ago
|
||
Err, didn't notice that you're the reporter. Nevermind my above comment then. It
still wasn't explained clearly.
Comment 7•20 years ago
|
||
(In reply to comment #4)
> Gavin, that's not the problem. The problem is that Shift+Delete still deletes
> the autocomplete entry *after* you perform selection/editing comments on the
> autocompleted URL.
So, if I understand correctly, the most appropriate fix would be to make "Home"
act like "Left Arrow" (hide the popup)? That would make it impossible to select
text with the dropdown open, therefore avoiding the problem.
I can't see any other possible solution, since the "selection/editing" shortcut
you're using (Shift+Del) already has another function in our UI.
Assignee | ||
Comment 8•20 years ago
|
||
This bug is slowly driving me insane.
Blocks: 241774
Flags: blocking-aviary1.1?
Assignee | ||
Comment 9•19 years ago
|
||
The solution I was thinking of was to change some hidden state when you start
editing so that Shift+Del (or, once bug 241774 is fixed, Del) acts on the text
rather than on the autocomplete entry. But Gavin's solution, closing the
autocomplete dropdown when you start navigating/selecting, sounds more sane than
having hidden state, and is consistent with the current behavior for the left
arrow key.
Comment 10•19 years ago
|
||
So, this isn't a "blocker" per se, since its really really low-impact, and
unknown risk. If you want to try a fix, the window is about a week and a half
really.
Flags: blocking-aviary1.1? → blocking-aviary1.1-
Assignee | ||
Updated•19 years ago
|
Assignee: bugs → jruderman
Assignee | ||
Comment 11•19 years ago
|
||
This might just be a simple fix in nsAutoCompleteController::HandleKeyNavigation
at
http://lxr.mozilla.org/mozilla/source/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp#424.
Untested pseudopatch:
} else if (aKey == nsIAutoCompleteController::KEY_LEFT ||
- aKey == nsIAutoCompleteController::KEY_RIGHT)
+ aKey == nsIAutoCompleteController::KEY_RIGHT ||
+ aKey == nsIAutoCompleteController::KEY_HOME)
{
Summary: Shift+delete to delete autocomplete entries is still active after editing commands → Pressing Home or Shift+Home should close autocomplete
Assignee | ||
Updated•19 years ago
|
Version: 1.0 Branch → Trunk
Comment 12•19 years ago
|
||
I've tested this on Windows, seems to work fine.
Attachment #191792 -
Flags: review?(mconnor)
Comment 13•19 years ago
|
||
Oh, I forgot to change the comment just below the change in
nsAutocompleteController.cpp, I've changed it to:
// The user hit "Home" or the left or right arrow key
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox1.1
Comment 14•19 years ago
|
||
Comment on attachment 191792 [details] [diff] [review]
patch
please get some testing on Mac/Linux before getting approval.
Attachment #191792 -
Flags: review?(mconnor) → review+
Comment 15•19 years ago
|
||
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050806 Firefox/1.0+
Works on Linux, too. :)
Assignee | ||
Comment 16•19 years ago
|
||
On Mac, the Home key only affects the scroll position, and it doesn't do
anything in the address bar. So the second hunk should probably get an #ifndef
XP_MACOSX.
Assignee | ||
Comment 17•19 years ago
|
||
I haven't tested this yet; I'm rebuilding now to test on Mac.
Attachment #191792 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #191862 -
Flags: review?(mconnor)
Assignee | ||
Comment 18•19 years ago
|
||
Compiles and does the right thing on Mac (no difference in behavior from not
having the patch).
Comment 19•19 years ago
|
||
*** Bug 298689 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Attachment #191862 -
Flags: review?(mconnor)
Attachment #191862 -
Flags: review+
Attachment #191862 -
Flags: approval1.8b4+
Comment 20•19 years ago
|
||
Checking in components/autocomplete/src/nsAutoCompleteController.cpp;
/cvsroot/mozilla/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp,v
<-- nsAutoCompleteController.cpp
new revision: 1.32; previous revision: 1.31
done
Checking in content/widgets/autocomplete.xml;
/cvsroot/mozilla/toolkit/content/widgets/autocomplete.xml,v <-- autocomplete.xml
new revision: 1.44; previous revision: 1.43
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 21•19 years ago
|
||
*** Bug 230677 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•