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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 9.0.1
    • 8.6.0, 9.0.0
    • None
    • Security Level: Jimmy
    • None
    • ZK 9.0.1 S1

      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

            Leon03 Leon03
            MDuchemin 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