]> source.dussan.org Git - vaadin-framework.git/commit
Prevent scroll position reset on GridLayout hierarchy change (#13386)
authorJohannes Dahlström <johannesd@vaadin.com>
Thu, 24 Apr 2014 14:17:42 +0000 (17:17 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 29 Apr 2014 12:00:09 +0000 (12:00 +0000)
commita3311d8135bcf153a7df709f93575b3654c0bff4
treebc4e53c5c4587ae0808ae3873980996e3f1b08bc
parent98be6b1978f3ff03a9486f34c22d11cc134bf1c9
Prevent scroll position reset on GridLayout hierarchy change (#13386)

State change handling by default clears measured size if the size is set
to undefined; this would cause GridLayout to shrink to zero size because
its child cells have position: absolute. The layout phase recomputes the
size, but in some cases the browser reflows first, affecting the scroll
position of the layout parent. This patch prevents GridLayout from
clearing once-computed sizes during state change.

Change-Id: Id6e066c3ea360083d16d3fcc5c6d7d4bb6cea8b7
client/src/com/vaadin/client/ui/AbstractComponentConnector.java
client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java
uitest/src/com/vaadin/tests/components/gridlayout/GridLayoutScrollPosition.java [new file with mode: 0644]
uitest/src/com/vaadin/tests/components/gridlayout/GridLayoutScrollPositionTest.java [new file with mode: 0644]