Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3500

Chosenbox doesn't create a new item when you press the enter key before the popup shows up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.0.5
    • 8.0.3, 8.0.4
    • None
    • Security Level: Jimmy
    • None
    • None

      steps to reproduce

      1. load the attached zul
      2. type "aa" (a new item) quickly and press enter key before the popup shows up

      current result

      • the Chosenbox doesn't add the new item and doesn't highlight the "create new item" option, so pressing the enter key takes no effect.

      workaround

      see <script> in the attached zul

      debug info

      • in _doEnterPressed(), when pressing an enter before the popup shows, it will show the popup without selecting (highlighting) any item. So pressing enter with no selected item doesn't create any new item.
      • In JIRA issue Labels field, you need to wait for a popup open after typing an unexisting item to create a new item. But there is another design, that pressing enter key creates a new item immediately, please refer to https://select2.github.io/examples.html#tags

            wenninghsu wenninghsu
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 7 hours
                1d 7h