Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33686

Keyboard selection doesn't work in closed combobox

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Apache Flex 4.9.0, Apache Flex 4.10.0
    • Fix Version/s: Apache Flex 4.10.0
    • Component/s: Spark: ComboBox
    • Labels:
      None
    • Environment:
      Windows 7, Intel i5, 4GB RAM

      Description

      Selecting (custom) text using the keyboard in a closed combobox doesn't work.

      Steps to reproduce:
      Compile and run the following application

      <?xml version="1.0" encoding="utf-8"?>
      <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx">
      <s:Group>
      <s:layout><s:HorizontalLayout /></s:layout>
      <s:ComboBox id="myCombo" width="200" >
      <s:dataProvider>
      <mx:ArrayList>
      <fx:String>test1</fx:String>
      <fx:String>test2</fx:String>
      <fx:String>test3</fx:String>
      </mx:ArrayList>
      </s:dataProvider>
      </s:ComboBox>
      <s:TextInput id="myText" width="200" />
      </s:Group>
      </s:WindowedApplication>

      Click in the combo box and type "abc" (w/out quotes) and then press enter.
      Press shift + end

      Actual: The text input contains the value "test3" and the cursor remains at the start of the text. No selection has been made.

      Expected: The text input should contain the value "abc" and that text should be selected (cursor located after the letter "c").

      The reason lies in DropDownListBase::keyDownHandler between lines 784 and 855, which allows vertical keyboard navigation in the (closed) combo/dropdown control. However, it ignores the status of the "shift" key (and incidentally also of the "alt", "ctrl", and "command" keys), which indicate different behaviour.
      In the case of a pressed shift key no navigation should occur, instead, at least for HOME and END keys the text should be selected accordingly.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              davidb77 david bel
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: