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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.5
    • Fix Version/s: 8.5.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      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>
      
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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