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

TypeError: ref is undefined after ZK-3943

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.2
    • Fix Version/s: 8.6.0
    • Component/s: Components
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.6.0 S1

      Description

      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);
              }
          });
      });
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  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