After ZK-3179, toolbar expects popup nodes, cause NPE if not rendered

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • 9.0.1
    • Affects Version/s: 8.6.0, 9.0.0
    • Component/s: None
    • Security Level: Jimmy
    • None
    • ZK 9.0.1 S1
    • None

      Steps to Reproduce

      Run fiddle

      http://zkfiddle.org/sample/nqqioa/4-remove-From-Toolbar-js-Error

      click button

      Current Result

      zul.wgt.Toolbar.removeChild cause NPE since popup is null (not rendered)

      Expected Result

      toolbar should check for popup existence before accessing, then do super() if no popup exits

      Debug Info

      Root Cause

      no check for popup existence

      https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/wgt/Toolbar.js#L222-L226

      Workaround

            Assignee:
            Leon03
            Reporter:
            MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 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