6pac / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://github.com/6pac/SlickGrid/wiki
MIT License
1.82k stars 424 forks source link

Is it possible to add maxSupportedCssHeight as an option to the init function? #680

Closed yiunsr closed 2 years ago

yiunsr commented 2 years ago

I'm making a csv viewer program using a webview called lightsheet_rust(https://github.com/yiunsr/lightsheet_rust). I am using slickgrid in this program. The program aims to read very large csv files. So, we use the remote model of slickgrid and store the actual data in sqlite. I read millions of csv files and found that cell border disappears when scrolling quickly. I made a sample once. It can be reproduced in Chrome or the latest Edge. (https://jsfiddle.net/nahanmil/2sqv0ohr/)

ezgif-3-c7ee2deaaa

This seems to be a bug in chrome. This is presumably caused by very long scrolling. So by forcing getMaxSupportedCssHeight() to fix the value you can get around the problem. It seems that the css supported height and the actual layout support height are different.

The easiest way around this is to provide maxSupportedCssHeight as an option.

6pac commented 2 years ago

Thanks @yiunsr for the bug report. I'd be happy to add maxSupportedCssHeight as an option since it's very simple to do. However before I do that, I note that I can't reproduce this problem using the provided fiddle on Chrome in Win 10, Chrome on MacOS, or Edge. I get borders all the way to the bottom.

yiunsr commented 2 years ago

It does not reproduce when scrolling down slowly. It is only reproduced when scrolling down very quickly using the right scrollbar. And it is best reproduced when you scroll quickly from the first content to 80% of the content. Scrolling is not reproduced because it scrolls slowly when using the mouse wheel or keyboard.

gif reproduced on Windows 10, Chrome. The same is reproduced in Windows 10 + Edge, OSX (macOS Monterey 12.3.1, x86) + Chrome (103.0.5060.53) , OSX (macOS Monterey 12.3.1) + Safari (15.4). Firefox is not reproducible, seems to be working correctly because of this code(https://github.com/6pac/SlickGrid/blob/master/slick.grid.js#L944 ).

6pac commented 2 years ago

OK, I still cannot repro, but I'm happy to take your word for it. There are a couple of other changes I need to make, give me a day or so and I'll release an update.

yiunsr commented 2 years ago

Thank you so much.