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

popup in no-dom element initialize in the wrong place, doesn't clean up

    Details

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

      Description

      Steps to Reproduce

      http://zkfiddle.org/sample/339u6gg/2-pop-in-no-dom-dom-tree-bug
      run fiddle
      each click on the changepp button will refresh the apply tag and cause a new no-dom and popup to be added to the page.

      Current Result

      The popup is added after the rest of the siblings in his container, thus it is created after the no-dom end tag.
      When the no-dom is removed, it removes the content between the start and end tags, but the popup is not there, so it is not removed.

      This cause duplicated nodes with duplicated UUIDs to pile up and cause additional issues down the line (fail to invoke, fail to bind, duplicate uuid)

      Expected Result

      Popup should be working as normal inside a no-dom holder

      Debug Info

      <div id="zEyP0" class="z-div"> <button type="button" id="zEyP1" class="z-button">change pp</button> <span id="zEyP2" class="z-label">aaaaaaaa</span><div id="zEyP5" style="display:none"></div><div id="zEyP9" style="display:none"></div><div id="zEyP5" style="display:none"></div><div id="zEyPd" style="display:none"></div><div id="zEyP9" style="display:none"></div> <a id="zEyPb" class="z-a" href="javascript:;">link</a>
      <!--z-nodom zEyPc start-->
      <!--z-nodom zEyPc end-->
      <div id="zEyPd" style="display:none">
      </div>
      </div>
      

      Root Cause

      Combination of VParent / popup ghost position / nodom workflow
      https://github.com/zkoss/zk/blob/65d556f9261159293f7a40db62aa2f9ea29d542e/zk/src/archive/web/js/zk/dom.js#L1717

      Workaround

      use div instead of nodom

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: