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

The position of popup is changed after a ROD loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.2
    • 8.5.2.1
    • Components
    • ZK 8.6.2 S2
    • None

      Steps to Reproduce

      <zk>
          <zscript><![CDATA[
          List list = new ArrayList();
          for (int i = 0; i < 100; i++) {
              list.add("item" + i);
          }
          ListModel listModel = new SimpleListModel(list);
      ]]></zscript>
          <window height="100%" width="100%">
              <div vflex="1">&#160;</div>
              <div align="center">
                  <button label="Click to Popup" popup="mypopup"/>
              </div>
              <popup id="mypopup" width="380px">
                  <listbox rows="10" model="${listModel}">
                      <listhead>
                          <listheader label="Header" sort="auto" />
                      </listhead>
                  </listbox>
              </popup>
          </window>
      </zk>
      
      1. Click the button
      2. Scroll the listbox to trigger a ROD loading

      Current Result

      The popup is repositioned.

      Expected Result

      The popup shouldn't be repositioned.

      Debug Information

      A side effect of ZK-4030.

      The popup is repositioned due to listbox rows="10", the _adjustTop should be updated.
      https://github.com/zkoss/zk/blob/v8.6.1/zul/src/archive/web/js/zul/wgt/Popup.js#L162

      Workaround

      1. Put <popup> outside the <window>
      2. Replace <window> with <div> or <panel>

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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