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

JS Error with flex grid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.3
    • Freshly, 8.0.3
    • ZK Client Engine
    • Security Level: Jimmy
    • tested with FL: 8.0.3.FL.20160711-Eval

    • ZK 8.0.3 S7

      steps to reproduce

      run attachment: flex-grid.zul

      actual result

      JS error:

      zul.mesh.wpd:931 Uncaught TypeError: jq.scrollbarHeight is not a function
      setFlexSize_ @ zul.mesh.wpd:931
      fixFlex @ zk.wpd:21439
      onSize @ zk.wpd:21302
      _invoke @ zk.wpd:12788
      ...
      

      expected result

      grid with dimension 200 x 150 pixels

      root cause

      possible side-effect of ZK-3074
      https://github.com/zkoss/zk/commit/5dd722e73e2bd219f73c943a44fd29493fb29b1c#diff-9d09aa23b5e41daed1a2f2cf664115e0R1078

      workaround

      a partial workaround is to temporarily define the undefined method as in attachment flex-grid-workaround-resize.zul

      <script><![CDATA[
      	zk.afterLoad(function() {
      		jq.scrollbarHeight = jq.scrollbarWidth; 
      	});
      ]]></script>
      

      this avoids the JS error, but still the height of the grid is calculated incorrectly (167px)
      clicking the button "resize grid" also causes an incorrect width (217px)

        1. flex-grid.zul
          0.6 kB
          cor3000
        2. flex-grid-workaround-resize.zul
          0.8 kB
          cor3000

            SEFI SEFI
            cor3000 cor3000
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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