0 Replies Latest reply on Nov 12, 2009 1:25 PM by Jason Szeto

    [svn:fx-trunk] 11737: ComboBox and DropDownList bug fixes

    Jason Szeto Level 3

      Revision: 11737

      Author:   jszeto@adobe.com

      Date:     2009-11-12 13:25:33 -0800 (Thu, 12 Nov 2009)


      Log Message:


      ComboBox and DropDownList bug fixes


      SDK-23635 - Implement type-ahead in DropDownList


      Added code in DropDownListBase keyDownHandler to listen for letters and change the selection if there is a match. At some point, we should modify findKey and findString (I'll file an ECR for that). For now, I've just overridden findKey and cobbled together the logic from List.findKey and List.findString. In ComboBox, we override findKey to do nothing since ComboBox has its own logic that relies on textInput changes.


      SDK-23859 - DropDownList does not reset caretIndex when selection is cleared


      Fixed this in two places. In ComboBox.keyDownHandlerHelper, we update the caret index when ESC is pressed. In DropDownListBase.dropDownController_closeHandler, we update the caret index if the commit has been canceled (ie. ESC was pressed).


      SDK-24175 - ComboBox does not select an item with ENTER when openOnInput = false


      When the ComboBox was closed and the arrow keys were pressed, the selectedIndex was changed. When ENTER was pressed, it was committing actualProposedSelectedIndex, not selectedIndex. The fix is to override the selectedIndex setter to keep actualProposedSelectedIndex in sync if selectedIndex was changed. Usually it is kept in sync when the dropDown is opened.


      SDK-24174 - ComboBox does not scroll correctly when openOnInput = false


      When typing in a match, the caretIndex was changed, but not the selectedIndex (because matching when it is closed doesn't commit the value until you press ENTER or lose focus). When closed, the navigation keys were changing the selectedIndex relative to the previous selectedIndex. I updated this to change relative to caretIndex instead. In most cases, caretIndex and selectedIndex are equivalent while the dropDown is closed.


      Other changes:


      - Replaced some calls to dropDownController.isOpen with isDropDownOpen.

      - Added protection RTE protection to ComboBox.changeHighlightedSelection


      QE notes: None

      Doc notes: None

      Bugs: SDK-23635, SDK-23859, SDK-24175, SDK-24174

      Reviewer: Deepa

      Tests run: ComboBox, DropDownList

      Is noteworthy for integration: No


      Ticket Links:











      Modified Paths: