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

Combobox grows its width for opening its popup each time

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.0, 8.6.2
    • Fix Version/s: 8.6.3
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.3 S1

      Description

      Steps to Reproduce

      1. run the page

          <combobox hflex="min">
              <comboitem label="Simple and Rich"/>
              <comboitem label="Cool!"/>
              <comboitem label="Ajax and RIA"/>
              <comboitem label="Ajax and RIA looooong looooooooong"/>
          </combobox>
      

      2. click the button to open the drop-down 2 times

      Current Result




      combobox width grows longer each time

      Expected Result

      The width of combobox grows as the same width as the popup (since popup is the child)
      Shouldn't grow longer each time

      Debug Information

      https://github.com/zkoss/zk/blob/v8.6.2/zk/src/archive/web/js/zk/widget.js#L3348
      If the child is floating, the parent won't be the component itself.
      It will keep calculating until there is no parent.

        Attachments

        1. 1st.png
          1st.png
          15 kB
        2. 2nd.png
          2nd.png
          12 kB
        3. base.png
          base.png
          10 kB

          Activity

            People

            • Assignee:
              rudyhuang rudyhuang
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - 2 hours Remaining Estimate - 2 hours
                2h