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
Table scroll position jumps to top after item set change event #3727
Comments
|
Originally by archie172 Attachment added: |
|
Originally by @Artur- This sounds very similar to fixes done in 6.8.x some months ago but these have been merged to 7.0.3 already. Needs to be investigated if this can be fixed properly in the current Table implementation. |
|
Originally by archie172 Looks like I forgot to set the issue priority. Setting to normal. |
|
Originally by piotr I have been having this problem as well. Would be more than happy if you could fix it asap. |
|
Originally by piotr This appears to be fixed in 7.0.6? |
|
Originally by @hesara This is still reproducible with Vaadin 7.0.6 with a simplified version of the demo application. |
|
Originally by @hesara Investigating this further, the issue seems to depend on at which point the item set is changed during request processing. It is not completely clear yet if the test WAR modifies the container size early enough in request processing or only in the paint phase, where the container should not be modified. An example of an application that does not exhibit the problem as it makes sure the container is expanded before the table is otherwise painted: |
|
Originally by T-Gergely Replying to Kronqvist: This introduced a new bug: http://dev.vaadin.com/ticket/13338#comment:2 |
Originally by archie172
I have a
Tablethat is backed by an indexedContainerwhich contains data of an unknown size (actually the data size is known but expensive to calculate).So the
Containerautomatically grows in size when an item near the end of the container is accessed (specifically, past the 85% mark), causing an item set change event to be generated.The above information is just to motivate this example and explain the attached test case.
The actual problem is: if the
Tablereceives an item set change event while the scroll bar is being positioned, the scroll position is lost and the scroll bar jumps back up to near the top of the table.This problem is not specific to this "auto-growing"
Containerexample. I have seen it in other situations as well.The problem seems to occur any time item set change events can be generated while scrolling a
Table. Since when the user might want to scroll is unpredictable, this problem applies to anyTableconnected to aContainerthat spontaneously generates item set change events, e.g., perhaps reflecting some server-side process that is being monitored.Having a
Tableshow a real-time view of some information is a very common GUI task. For example, imagine a twitter feed, stock ticker, etc., showing the most recent event on top.If scrolling through the
Tableis disrupted every time there is a new item added to theTable, this is obviously a major annoyance. It becomes more than just an annoyance however, and especially frustrating, when theTablecontains a large number of rows, because not only do you lose your place in the list and have to start over, but because it takes some time to scroll back down again to find where you were before, another update comes in and the problem occurs again, etc. So you are effectively "locked out" from viewing anything but the top part of theTablebecause you can never get there in time.How to reproduce this problem:
Tablewill resize, but the scroll bar jumps back up near the topPossibly related: #10106
Imported from https://dev.vaadin.com/ issue #11454
The text was updated successfully, but these errors were encountered: