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

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

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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