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

The position of popup is changed after a ROD loading

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.2.1
    • Fix Version/s: 8.6.2
    • Component/s: Components
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S2

      Description

      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>

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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