Opened 7 years ago

Closed 7 years ago

#14917 closed enhancement (duplicate)

Select: search via first letter keys

Reported by: Pete Smith Owned by: Douglas Hays
Priority: undecided Milestone: future
Component: Dijit - Form Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


Normal HTML selects (say US states) respond to typing the first char of an item, like M will bring you to Maine. I expected the dijit Select to do this, but it does not, even on the test in 1.7.2.

Change History (6)

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbdfuture
Type: defectenhancement

Patches are welcome

comment:2 Changed 7 years ago by Douglas Hays

Summary: Dijit.form.Select does not respond to keystrokesDijit.form.Select does not search via first letter keys

comment:3 Changed 7 years ago by Pete Smith

Doughays, I will try to get this going. This is really a serious problem though - you can't have a drop in replacement for native selects without it.

comment:4 Changed 7 years ago by bill

Summary: Dijit.form.Select does not search via first letter keysSelect: search via first letter keys

Note that Tree has code for this. Actually, it's even fancier because you can search on multiple letters. Not sure, but you might want to extract that into a common class (ie, the part that monitors keystrokes and uses a timer to tell when to treat the second keystroke as a continuation of the first one, or as the start of a new search).

comment:5 Changed 7 years ago by Pete Smith

Just to let you all know, we are going back to standard selects. Now with mobile / tablets you really need a standard select anyway. I think the whole "manufactured in markup" style selects are going to be obsolete.

BUT we need the validation behaviors to be consistent between ALL form elements. I have created a _Validatable class that all my lite dijit wrappers extend, but it applies the form element on STANDARD html5 form elements.

The requirement for a new dijit.form should be:

1.) Lightweight dom element wrappers

2.) Validateable client side OR easily apply server side validation techniques in combination. The desired result is to do client side validation first (For basic stuff) and then do an optional server side validation and handle the SAME dijit/form/Form "validate" behaviors. The onBlur / onFocus is a maze of overrides and I have jumped through hoops to get the server side validation working.

3.) HTML5 behaviors are leaking in, and we should figure out the best way to do this. For example, if you put "required=true" on a normal <select> it actually displays a tooltip in webkit! This mystery black tooltip with "you must select a value" comes out. The placeholder attribute as well. The dijit form elements should let old browsers go, and give the developer the ability to override custom dijit behavior if they want.

Last edited 7 years ago by Pete Smith (previous) (diff)

comment:6 Changed 7 years ago by Douglas Hays

Resolution: duplicate
Status: newclosed

Duplicate of #10251.

Note: See TracTickets for help on using tickets.