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

TypeError: ref is undefined after ZK-3943

XMLWordPrintable

    • ZK 8.6.0 S1

      Steps to Reproduce

      run the attachment B85-ZK-3676.zul

      Current Result

      Browser console: TypeError: ref is undefined / TypeError: Cannot read property '$n' of undefined

      Expected Result

      No error

      Debug Info

      side effect of ZK-3943
      https://github.com/zkoss/zk/blob/6f10f381f2bc470876b96d89ae15619ebb5aec73/zul/src/archive/web/js/zul/wgt/Notification.js#L228
      Typically _fixarrow needs a ref object, but no argument is given.

      Workaround

      zk.afterLoad('zul.wgt', function () {
          var xNotification = {};
          zk.override(zul.wgt.Notification.prototype, xNotification, {
              reposition: function () {
                  this.$supers('reposition', arguments);
                  if (this._ref) this._fixarrow(this._ref);
              }
          });
      });
      

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 1 hour Remaining Estimate - 1 hour
                1h