Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16589 closed enhancement (fixed)

[patch] [cla] Select: allow type ahead on closed list

Reported by: Bob Tarling Owned by: Douglas Hays
Priority: undecided Milestone: 1.9
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: #16323 Blocking:

Description

The attached patch allows type ahead on a Select control when that control does not have its dropdown displayed.

Patch is from 1.9 trunk (not shown in trac version field)

Attachments (3)

Select.js.patch (2.5 KB) - added by Bob Tarling 6 years ago.
Patch to be applied to Select.js
16589.patch (3.7 KB) - added by Douglas Hays 6 years ago.
Implement search by letter with the dropdown closed using existing logic, including support for HOME and END keys
16589_KeyNavMixin.patch (20.8 KB) - added by Douglas Hays 6 years ago.
patch that refactors _KeyNavContainer and _KeyNavMixin so Select only inherits from _KeyNavMixin

Download all attachments as: .zip

Change History (14)

Changed 6 years ago by Bob Tarling

Attachment: Select.js.patch added

Patch to be applied to Select.js

comment:1 Changed 6 years ago by bill

Summary: [patch] Select: allow type ahead on closed list[patch] [cla] Select: allow type ahead on closed list

Confirmed Robert Tarling filed a CLA.

comment:2 Changed 6 years ago by Douglas Hays

Milestone: tbd1.9

Changed 6 years ago by Douglas Hays

Attachment: 16589.patch added

Implement search by letter with the dropdown closed using existing logic, including support for HOME and END keys

comment:3 Changed 6 years ago by Douglas Hays

bobtarling, can you test with the 16589.patch file? It still needs a code review and automated tests.

comment:4 Changed 6 years ago by Bob Tarling

The behaviour looks good to me through my own local testing. Clearly the implementation is better to reuse the existing logic.

comment:5 Changed 6 years ago by bill

Should it be extending _KeyNavMixin instead of _KeyNavContainer, since Select is not a dijit/Container widget? Maybe I just don't understand how it's working, since I don't see how the KeyNav code is getting access to the list of items in the drop down, i.e. I don't see how _getNextFocusableChild() is working.

comment:6 Changed 6 years ago by Douglas Hays

Select needs _getNextFocusableChild and the HOME/END key processing in _KeyNavContainer (this is a lot of the entire mixin so I used it instead of copying code).

comment:7 Changed 6 years ago by Douglas Hays

Blocked By: 16323 added

Changed 6 years ago by Douglas Hays

Attachment: 16589_KeyNavMixin.patch added

patch that refactors _KeyNavContainer and _KeyNavMixin so Select only inherits from _KeyNavMixin

comment:8 Changed 6 years ago by Douglas Hays

added new patch to reduce Select inheritance

comment:9 Changed 6 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

In [30620]:

Fixes #16589. Refactor _KeyNavMixin and _KeyNavContainer so Select can inherit keysearch and HOME/END functionality through inheritance from _KeyNavMixin. Add automated Select tests. !strict

comment:10 Changed 6 years ago by bill

In [31167]:

fix dangling "registry" parameter in AMD declaration, which was neither used nor defined, refs #16589

comment:11 Changed 6 years ago by bill

In [31291]:

Roll back the [31124] change to _HasDropDown so it can come before or after _KeyNavMixin in the inheritance chain, thus allowing Select to have a saner list of superclasses. Fixes #17040, refs #16589 !strict.

Note: See TracTickets for help on using tickets.