Open Bug 685985 Opened 14 years ago Updated 1 year ago

delete (or shift/delete) of a row in the rich url bar results does not select the next item after delete

Categories

(Toolkit :: Autocomplete, defect, P5)

defect

Tracking

()

People

(Reporter: kdevel, Unassigned)

Details

Attachments

(1 file)

User Agent: Steps to reproduce: 1. Enter very few letters in urlbar. 2. Cursor down to highlight first entry in the list. 3. DEL, Shift-DEL or Ctrl-DEL (like in Bug 406179 and Bug 406238, regression or changed UI?) Actual results: 3. Entry is deleted, urlbar keeps old URL. Expected results: 3. Delete deleted URL from urlbar.
Component: General → Location Bar
OS: Other → All
QA Contact: general → location.bar
Hardware: Other → All
Verified on: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0a1) Gecko/20110921 Firefox/9.0a1 Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110921 Firefox/9.0a1 Mozilla/5.0 (Windows NT 6.1; rv:9.0a1) Gecko/20110915 Firefox/9.0a1 STR: 1. Enter very few letters in urlbar. 2. Cursor down to highlight first entry in the list. 3. DEL, Shift-DEL or Ctrl-DEL Expected Results: The entry is deleted and only the letters entered at step 1 are left in the URL bar. Actual Results: The entry is deleted and the URL from the deleted entry is left in the URL bar.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This(In reply to Stefan from comment #0) > ... regression or changed UI? I have verified all the releases back to Fx 3.6 and this issue reproduces on all of them so I believe this is neither a regression nor a changed UI.
Fx 3.5 sets the new value if the deleted row has been navigated to by cursor up/down. Successive deletion doesn't change the field value. Fx 3.6 does not change the field value upon deletion. RETURN after DELETE does not select the focused record. So in order to delete a record and select the record next to the deleted one requires additional cursor-movement + a RETURN. Fx 2.0 behaves as expected.
Attached patch patchSplinter Review
This fixes it, but I don't know enough about this component to know if this is the best way or if this will cause other problems (I included a test for this feature, but we can ignore that for now - the important part of the patch is in nsAutoCompleteController.cpp).
Attachment #638914 - Flags: review?(mano)
Mano - I figured you were the person to ask for a review because of what it says on https://wiki.mozilla.org/Toolkit/Submodules but if someone else would be more appropriate, I'll ask them instead - thanks.
Comment on attachment 638914 [details] [diff] [review] patch I am somewhat surprised that autocomplete doesn't list to "select" events in the popup, and, instead, does everything in HandleKeyNavigation. That's bad. If it did listen to select, selecting the next item (as done in HandleDelete) would avoid the need to fix this manually. Having said that, I realize that's a "big" change to a somewhat scary code. So, at the very least, we should avoid the code duplication introduced here... Could you try factoring out this code to another method and use it both here and in HandleKeyNavigation? Thanks for your work on this!
Attachment #638914 - Flags: review?(mano) → feedback+
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Priority: -- → P5
Resolution: INACTIVE → ---

doesn't apply to the address bar anymore.

Status: REOPENED → NEW
Component: Address Bar → Autocomplete
Product: Firefox → Toolkit
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: