Ctrl+Left should close autocomplete

RESOLVED FIXED in Firefox 2 beta1

Status

()

P4
normal
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: jruderman, Assigned: Gavin)

Tracking

({dataloss, fixed1.8.1})

2.0 Branch
Firefox 2 beta1
dataloss, fixed1.8.1
Points:
---
Bug Flags:
blocking-firefox2 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

13 years ago
Steps to reproduce on Windows:
1. Start typing into the address bar.
2. Select an autocomplete entry with the Down arrow key.
3. Press Ctrl+(Shift)+Left.
4. Press Delete.  (In Firefox 1.5.0.1, press Shift+Delete instead.)

Result: autocomplete entry is deleted unexpectedly.

Expected: normal text-editing behavior for Delete (delete selection or next character) or Shift+Delete (cut selection).

The Left arrow key and Home already close autocomplete, so fixing this bug would also improve consistency.  Opt+Left should probably be changed in the same way on Mac (just for consistency), even though this won't be a dataloss issue on Mac once bug 325737 is fixed.

This bug was originally mentioned in bug 325737 comment 1 by Gennady Feldman.

This can probably be fixed the same way bug 255116 was fixed.
(Reporter)

Comment 1

13 years ago
Nominating for blocking Firefox 2.  Delete is a more common shortcut than Shift+Delete, so this is likely to be more of a problem now that Delete deletes autocomplete entries instead of Shift+Delete.
Flags: blocking-firefox2?
Needs a more generalized solution to ensure that any time of action that changes selection or cursor position kills the popup
Flags: blocking-firefox2? → blocking-firefox2+
Created attachment 213544 [details] [diff] [review]
wip (diff -w)

This seems to fix the case described here, but I've not gone through the different possibilities to make sure this doesn't regress anything. There might be a better fix for this, too. It'd sure be nice if nsIAutoCompleteController used the same key constants as nsIDOMKeyEvent...
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED

Updated

13 years ago
Target Milestone: --- → Firefox 2 beta1
OS: Windows XP → All
Priority: -- → P4
Hardware: PC → All
Version: Trunk → 2.0 Branch
See also Bug 337695, possible dupe.
Whiteboard: [swag: 1d]

Comment 5

13 years ago
*** Bug 340377 has been marked as a duplicate of this bug. ***
*** Bug 337695 has been marked as a duplicate of this bug. ***
Created attachment 226066 [details] [diff] [review]
patch
Attachment #213544 - Attachment is obsolete: true
Attachment #226066 - Flags: review?(mconnor)
Attachment #226066 - Flags: approval-branch-1.8.1?(mconnor)
Whiteboard: [swag: 1d] → [patch-r?]
Comment on attachment 226066 [details] [diff] [review]
patch

so, it'd be nice to kill the event and return true after each switch block if cancel is true, since then we skip doing a bunch of additional checks, but its not that critical
Attachment #226066 - Flags: review?(mconnor)
Attachment #226066 - Flags: review+
Attachment #226066 - Flags: approval-branch-1.8.1?(mconnor)
Attachment #226066 - Flags: approval-branch-1.8.1+
Whiteboard: [patch-r?] → [checkin needed+]
mozilla/toolkit/content/widgets/autocomplete.xml 	1.44.2.15
mozilla/toolkit/content/widgets/autocomplete.xml 	1.65
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [checkin needed+]
You need to log in before you can comment on or make changes to this bug.