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

nodom JS errors and wrong insertion points

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.6.2, 8.6.3
    • Fix Version/s: 9.0.0, 8.6.4
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      Steps to Reproduce

      case 1:

          <div>
              <nodom/>
          </div>
      

      case 2:

          <div>
              aaaa
              <nodom/>
          </div>
      

      case 3: click the button

      <zk>
          <div>
              <nodom id="nodom1"/>
              bbbb
          </div>
          <button onClick='nodom1.appendChild(new Label("aaaa"))'/>
      </zk>
      

      case 4: (more complex) click all buttons
      nodom-nested-insert-append.zul

      Current Result

      cases 1/2 result in JS errors

      zk.wpd:23927 Uncaught TypeError: Cannot read property 'nextSibling' of null
          at init.bind_ (zk.wpd:23927)
          at init.targetpt.<computed> [as bind_] (zk.wpd:11421)
          at init.bindChildren_ (zk.wpd:21291)
          at init.bind_ (zk.wpd:21254)
          at init.bindChildren_ (zk.wpd:21291)
          at init.bind_ (zk.wpd:21254)
          at init.bind (zk.wpd:21172)
          at init.replaceChildHTML_ (zk.wpd:20903)
          at init.replaceHTML (zk.wpd:20746)
          at mtBL0 (zk.wpd:24762)
      

      cases 3 (after clicking the button)

      bbbb aaaa
      

      cases 4 (after clicking all buttons)

      --- START ---
      1
      2
      3
      3.1
      3.1.1
      3.1.2
      3.1.3
      3.1.1.1
      --- END ---
      3.2
      4
      

      Expected Result

      1/2 no JS errors

      3:

      aaaa bbbb
      

      4:

      --- START ---
      1
      2
      3
      3.1
      3.1.1
      3.1.1.1
      3.1.2
      3.1.3
      3.2
      4
      --- END ---
      
      

      Debug Information

      the END comments are rendered in the wrong positions/nesting order

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                DevChu DevChu
                Reporter:
                cor3000 cor3000
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: