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

Combowigdets closed by scrolling off view don't send an openevent back to the server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.0
    • 8.0.5
    • None
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/2obka33/2-Combowidget-missing-close-event-on-scroll
      Scroll to bandbox
      Open bandbox
      Log show bandbox status on server side as open

      Scroll the container away from the bandbox
      When the bandbox leave the view, the popup is automatically closed

      Current Result

      Popup is closed, but server is not updated with closed status

      Expected Result

      Popup closes, server receive a closed status

      Debug Info

      in zul.inp.ComboWidget.onScroll()
      this.close();
      doesn't contain an option to send to server.
      (close(opts) method only send if a opts.sendOnOpen = true is passed when calling the function)

      Root Cause

      Workaround

      TESTED FOR ZK 8.0.5

      <script><![CDATA[
      zk.afterLoad('zul.inp', function() {
      	var xComboWidget = {};
      	zk.override(zul.inp.ComboWidget.prototype, xComboWidget ,{
      		onScroll: function (wgt) {
      			if (this.isOpen()) {
      				
      				if (wgt) {
      					var inp = this.getInputNode();
      					
      					if (inp && zul.inp.InputWidget._isInView(this))
      						zk(this.getPopupNode_()).position(inp, 'after_start');
      					else{
      						opts = {sendOnOpen:true};
      						this.close(opts);
      					}
      				}
      			}
      		}
      	});//zk.override
      });//zk.afterLoad
      ]]></script>
      
      

            rudyhuang rudyhuang
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h