Opened 11 years ago

Closed 9 years ago

Last modified 8 years ago

#8290 closed defect (wontfix)

ComboBox: Ctrl+Backspace doesn't work with autocomplete enabled

Reported by: david Owned by: Becky Gibson
Priority: high Milestone: 1.5
Component: Dijit - Form Version: 1.2.3
Keywords: combobox filteringselect Cc: davidb, Joseph Scheuhammer
Blocked By: Blocking:

Description (last modified by david)

If I have autocomplete enabled for a ComboBox (or FilteringSelect and it is filling in the value, when I press Ctrl+Backspace only the non-highlighted text is deleted, leaving me with the latter half of my completed word.

Example:

  • I want to pick "California".
  • I start by typing "Cal" and it autocompletes with "Cal[ifornia]" (the bracketed portion is the selected portion)
  • I change my mind and want to pick "New York"
  • I press Ctrl+Backspace to clear the contents of the box beginning from the end of my selection
  • And now my textbox reads: "ifornia"! Oops!

I just noticed that Firefox behaves in a similar way with text boxes (when you make a manual selection), but it isn't a problem because it isn't autocompleting them for you. It's one thing if you manually make a selection, but it's another when you are just typing. In other words, this behavior breaks the natural typing habits.

One suggestion would be to firstly delete anything selected whenever a Ctrl+Backspace is detected.

Change History (9)

comment:1 Changed 11 years ago by david

Description: modified (diff)

comment:2 Changed 11 years ago by Douglas Hays

Component: GeneralDijit
Owner: changed from anonymous to haysmark

comment:3 Changed 11 years ago by Douglas Hays

Milestone: tbd1.4

comment:4 Changed 10 years ago by haysmark

Owner: changed from haysmark to Becky Gibson

Becky, I wanted to run this by you. What is the standard use of ctrl-backspace? Seems that every program I have has a different idea.

comment:5 Changed 10 years ago by Becky Gibson

Cc: davidb Joseph Scheuhammer added

I agree - there seems to be no standard defined. I search my bookmarks of keyboard references and could find no explanation of what ctrl+backspace should do. In FF3 and IE8, ctrl-backspace within a textbox deletes everything that is NOT selected and then unselects what was selected. So, our combobox is following that standard behavior (what is not selected in the actual textbox is what is getting deleted). I'm tempted to leave it as is, since it follows the HTML standard behavior in both FF and IE. If a user just presses backspace, then the highlighted portion is deleted and they can backspace over the rest of the characters.

It would however, be nice if there was an easy way to clear the entire text field. Because part of the field is selected the user must perform a two step process to entirely clear. However, I still think following standard behavior is better. I'm inclined to close this as won't fix. I added davidb into the cc in case he was the one who submitted this and wants to comment.

comment:6 Changed 10 years ago by david

While, as Becky points out, ctrl-backspace with selections works as expected it isn't a normal selection so I think the behavior should be different. IMO, the field should respond as if you don't have anything selected because the user is currently in the act of typing, not selecting. If I'm entering info and hit ctrl+backspace then I expect the last word to disappear, but the widget adds a selection which breaks how one would expect ctrl+backspace to work.

I'm not sure how easy it would be to fix this since I didn't write the widget. I think the moral of the story is "auto-complete is bad" (again, my personal opinion). If #8289 (yes, I filed that one too) was fixed then I'd be happier because I could get tab-select without auto-complete (a la Gmail, Firefox, etc.).

comment:7 Changed 10 years ago by Becky Gibson

Milestone: 1.41.5

comment:8 Changed 9 years ago by Becky Gibson

Resolution: wontfix
Status: newclosed

marking as wontfix since this would require a significant overhaul to the widget. David you can reopen and mark as future but we are not likely to have the resources to make this level of change any time soon.

comment:9 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.