Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeTable scroll position erratic on update #12251

Closed
petrixh opened this issue Mar 22, 2021 · 1 comment
Closed

TreeTable scroll position erratic on update #12251

petrixh opened this issue Mar 22, 2021 · 1 comment
Labels
Milestone

Comments

@petrixh
Copy link
Contributor

petrixh commented Mar 22, 2021

While working on a customer case, an issue with the TreeTable scroll position being erratic at times came up.

Steps to reproduce (more details in the UI class in the example app):

  1. compile and run the app
  2. Navigate to the application with Firefox
  • This can be reproduced with Chrome as well, but sometimes Chrome seems to work just fine while FF seems
    easier to break... Probably depends on how much/many items are opened above, not sure...
  • Tested with FF 86.0.1 on OS X
  1. Expand some nodes at the top, for instance -1, 0, 10 and 110
  2. Scroll all the way down
  3. Expand node 9 and 9009
  4. Make sure the TreeTable is scrolled all the way down
  5. Select the check box for node 9010

Bug: the tree refreshes and the scroll position is lost, i.e. node 9010 is no longer visible

Expected: Even after a container refresh the TreeTable holds the correct scroll position

If the same test is done with the Reindeer-theme, the issue is not present. Also, with the Valo theme, if the TreeTable is given the "TABLE_NO_HORIZONTAL_LINES" style, then the issues seems to go away or at least be hidden.

Tested with:

Vaadin 7.7.17

Browser: Firefox 86.0.1, Chrome 89.8.4389.82 on OS X, however originally found in older browsers and repeatable in other environments as well.

Test app included for reproducing the issue.

v7-treetable-scroll-bug.zip

@jokiljuh
Copy link

Thanks Petri for reporting this.

TatuLund added a commit that referenced this issue Mar 23, 2021
If css grows row height the VSrollTable rowHeight logic does not work allways

Fixes: #12251
OlliTietavainenVaadin pushed a commit that referenced this issue Mar 25, 2021
* fix: Do not allow border to grow row height

If css grows row height the VSrollTable rowHeight logic does not work allways

Fixes: #12251

* Compensate change in default row height

* Merge branch '7.7' into fix12251

* Replace calc with round

* Make fix more pin-point

* The first row does not have border thus regular height

* Fix drag-drop styles

* Further fix in drag-and-drop style

* Update TableDropIndicatorValoTest-indicator_ANY_Chrome__indicator.png
@tarekoraby tarekoraby added the v7 label Mar 26, 2021
@tarekoraby tarekoraby added this to the 7.7.25 milestone Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants