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

menu popup closes when scrolling

XMLWordPrintable

      Steps to Reproduce

      1) run the attachment menu-popup-closing-on-scroll.zul
      2) open either the menu popup from the menubar or the button
      3) scroll the up or down

      Current Result

      the menupopup opened from the button remains open
      the same popup opened from the menubar closes immediately when scrolling

      Expected Result

      consistent behavior

      Debug Info

      when the menubar opens the popup it doesn't set the _fakeParent

      I am not sure why the _fakeParent was introduced, the _openInfo already contains the referencing component? (maybe not in all cases??)

      Root Cause

      potential side effect of ZK-3606 (and related issues)

      Workaround

      Always setting the _fakeParent when opening the popup seems to work in this case (might have unwanted side effects)

      	zk.afterLoad('zul.wgt', function() {
      		var xPopup = {};
      		zk.override(zul.wgt.Popup.prototype, xPopup, {
      			open : function(ref, offset, position, opts) {
      				if(ref) { this._fakeParent = zk.$(ref); }
      				return xPopup.open.apply(this, arguments);
      			}
      		});//zk.override
      	});//zk.afterLoad
      

            CharlesQiu CharlesQiu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h