Opened 4 years ago

Closed 4 years ago

#18590 closed defect (worksforme)

Tab complete for ComboBox tabs to the next control

Reported by: jbest Owned by:
Priority: undecided Milestone: 1.11
Component: Dijit - Form Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

Here is an example: http://jsfiddle.net/cubfa3r5/3/

Steps:

  1. Click run on the fiddle
  2. Select all the text in the US States combobox and clear it out
  3. Start typing Ariz
  4. The autocomplete should pop up as "Arizona", hit "TAB" to make the completion
  5. The next form element gets focus

Should TAB be selecting the autocomplete value AND tabbing to the next control? It seems like it should be stopping the TAB from bubbling the event.

Change History (6)

comment:2 Changed 4 years ago by bill

You can see this behavior also on the second control in test_ComboBox.html. I think it's by design but I really don't remember. Why do you think it would be useful to keep focus on the control even though the user has already completed filling in the value? In general I think when the user hits the TAB key they are finished with inputting the value and ready to move on to the next control.

About the PR, it probably breaks the existing regression tests (ComboBox_a11y.html etc.).

comment:3 Changed 4 years ago by jbest

Well the default behavior for ENTER is to implicitly submit the form, but the code that handles ENTER prevents bubbling of that. So we have a case where the default behavior of ENTER is overwritten and TAB is extended. Wouldn't you run into issues where ComboBox? is extended to support multiple values (http://dojotoolkit.org/reference-guide/1.10/dojox/form/MultiComboBox.html)? Tabbing once would tab out to the next control.

comment:4 Changed 4 years ago by bill

Well the default behavior for ENTER is to implicitly submit the form, but the code that handles ENTER prevents bubbling of that.

Yes, of course. We need to do that to prevent the form being submitted prematurely, if someone uses ENTER to auto-complete the value.

Wouldn't you run into issues where ComboBox? is extended to support multiple values?

I agree that in that case, TAB should not move to the next control.

comment:5 Changed 4 years ago by dylan

Milestone: tbd1.11

comment:6 Changed 4 years ago by bill

Resolution: worksforme
Status: newclosed

Sorry, as I wrote above I don't think we should change the current behavior.

Also, I tried to see how native form completion works (see http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_form_autocomplete), and at least on chrome/mac, the tab key will auto-complete *and* move to the next form control. You have to hit the down arrow first though; otherwise it just moves to the next form control without auto-completing.

Note: See TracTickets for help on using tickets.