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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.6.0, 9.0.0
    • Fix Version/s: 9.0.1
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      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

              Assignee:
              Leon03 Leon03
              Reporter:
              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