Open padisah opened 5 years ago
I think your report is duplicate of this issue: https://github.com/vaadin/framework/issues/6650
I can confirm, this is the same problem. But it wasn't fixed in Vaadin 8. Actually as I saw, the relevant codes that causes this are from Vaadin 7.
@padisah Do you have simplified test app that reproduces the problem? I tried to do couple of attempts, but I could not reproduce the issue with my test apps.
Ok, I will create a github repo to reproduce the issue.
https://github.com/padisah/vaadin8-scrollTop
here is the repo, that reproduces the issue simply mvn jetty:run works, I tried it
there were some efforts, that forces the long-polling, that should probably be replaced to a better way
Added a commit, which raises version to 8.8.6 and disables push, websocket, while leaves the polling in place.
Ah, now I see. I tried to reproduce the issue with @Push and LONG_POLLING transport mode, and there it does not happen. But if I indeed use polling UI instead of Push, then the issue is easy to reproduce.
Hello there!
We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.
There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!
I have created a Window with width 100%, and height undefined. This Window has more content than fits to the monitor, so a vertical scrollbar appears as it should. When manually scrolling to the bottom, it automatically scrolls back to the top on each
longpoll.Expected behavior: There should be no inadverted scrolling.
Actual behavior: Inadverted scroll.
Root cause: VWindow.java: @Override public void setHeight(String height) { // Override PopupPanel which sets the height to the contents getElement().getStyle().setProperty("height", height); // scrolls to top, even if height remains "" // Update v-has-height in case undefined window is resized setStyleName("v-has-height", height != null && !height.isEmpty()); }
AbstractComponentConnector.updateComponentSize() just calls for size update, without checking if there is any size change, and a side effect of scrolling happens.
Workaround: I set the window height to 100% instead of undefined, and it looks like solving the issue.