]> source.dussan.org Git - vaadin-framework.git/commit
Fix scrollTo for destination START and END and add regression testing. (#11707)
authorAnna Koskinen <Ansku@users.noreply.github.com>
Thu, 5 Sep 2019 11:21:57 +0000 (14:21 +0300)
committerGitHub <noreply@github.com>
Thu, 5 Sep 2019 11:21:57 +0000 (14:21 +0300)
commit8daef97f765be058e672eab1d29ab55e4c7a24e7
tree0231c07ded1a931d2dd205a331e68c0bee1b7add
parent6c190de82c22232cf9d59b807530b07822b0dfae
Fix scrollTo for destination START and END and add regression testing. (#11707)

- Initial implementation erroneously assumed that
ScrollDestination.START would only be used for scrolling up and
ScrollDestination.END for scrolling down. That's obviously not what they
are for, otherwise everyone would be using ScrollDestination.ANY.
- Moved actual scrolling to within the helper method that originally
only calculated the new scroll position. Parent method became too long
otherwise.

Fixes #11706
client/src/main/java/com/vaadin/client/widgets/Escalator.java
uitest/src/main/java/com/vaadin/tests/components/grid/GridScrollDestination.java [new file with mode: 0644]
uitest/src/test/java/com/vaadin/tests/components/grid/GridScrollDestinationTest.java [new file with mode: 0644]