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

Groupbox doesn't register content onScroll if closed during bind

    Details

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

      Description

      Steps to Reproduce

      Run fiddle
      http://zkfiddle.org/sample/33u3iah/3-error-box-not-sticking-in-closed-group-box
      Open the groupbox by clicking on it, and show validation messages by clicking the save button.
      Scroll the groupbox

      Current Result

      Data-scrollable doesn't work (popups don't follow scroll pos
      groupbox._doScroll is never invoked

      Expected Result

      groupbox._doScroll should be invoked and data-scrollable should trigger

      Debug Info

      ContainerWidget only registers the JS scroll listener on contentNode during bind
      If the groupbox is rendered closed, the contentNode doesn't exist yet.

      Root Cause

      Workaround

      Add a scroll listener during Open

      <script><![CDATA[
      zk.afterLoad('zul.wgt', function() {
      var xGroupbox = {};
      zk.override(zul.wgt.Groupbox.prototype, xGroupbox ,{
      setOpen : function() {
      var self = this;
      var result = xGroupbox.setOpen.apply(this, arguments);
      this.domListen_(this.getCaveNode(), 'onScroll');
      setTimeout(function()

      {self._doScroll();}

      ,700);
      return result;
      }
      });//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 - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h