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

Combobox grows its width for opening its popup each time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.3
    • 8.0.0, 8.6.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.3 S1

      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.

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

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

              Created:
              Updated:
              Resolved:

                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