Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-608

Excel sheet with wrapping text and auto-height rows can cause missing rows if user scrolls during rendering

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 5.11.0
    • 5.9.0, 5.10.0
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      Run attached zul + java sample

      Set the browser zoom level to 90% (also can reproduce on 100%, but less frequently)

      Load the page

      Resize the window to ~40 rows on screen

      reload the page

      While the page is loading, scroll down continuously

      Click a cell. If the cell blue selection square matches the row number blue selection highlight, then you didn't reproduce the issue. try again from "reload the page"

      Current Result

      Some rows are missing, the selection box is desynced from the row selection highlight by that many rows.

      May or may not cause other JS issues

      May or may not cause typing values to a new cell to write the input value to a number of rows above based on missing rows.

      see screenshots attached:

      #1: selection square is not synced with actual selection

      #2 missing rows : (the excel document doesn't have hidden rows)

       

      sample of possible JS errors:

      Uncaught TypeError: Cannot read properties of null (reading 'isMerged')
          at init._doMouseclick (zss.wpd:39080:14)
          at init._doMouseup (zss.wpd:38838:9)
          at init.doMouseUp_ (zss.wpd:19080:14)
          at _doEvt (zk.wpd:26479:39)
          at HTMLDocument.<anonymous> (zk.wpd:26641:3)
          at HTMLDocument.dispatch (zk.wpd:5410:27)
          at elemData.handle (zk.wpd:5062:28)
      _doMouseclick	@	zss.wpd:39080
      _doMouseup	@	zss.wpd:38838
      doMouseUp_	@	zss.wpd:19080
      _doEvt	@	zk.wpd:26479
      (anonymous)	@	zk.wpd:26641
      dispatch	@	zk.wpd:5410
      elemData.handle	@	zk.wpd:5062
      

       

      Expected Result

      No missing rows, not secondary issues

       

      Debug Information

      The sample contain a "performance lowering pseudo-sleep function" because the user must scroll while rendering cells.

      The issue can be reproduced without it, but it would have made creating a reproducing excel sheet way more time-consuming (it would require a lot of expensive features like large data, lot of references, merged cells and styles)

      The issue happens if the user scrolls after the rows from the initial rendering have been added to the DOM, but while the rows with wrapping cells and auto height are still calculating their heights.

      (cell height calculation cause the active range to be pruned)

      the issue is timing sensitive, so you may need to reload and scroll multiple times to reproduce. 

      reported on 5.9.0, also reproduced on 5.10.0

      Workaround

      In the zul file attached, commented out

        1. keikai-row-sync-bug.PNG
          keikai-row-sync-bug.PNG
          13 kB
        2. keikai-row-sync-bug-missing-rows.PNG
          keikai-row-sync-bug-missing-rows.PNG
          13 kB
        3. repro.zul
          5 kB
        4. test.xlsx
          60 kB

            gordonhsu gordonhsu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: