forked from parttio/touchkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scrolling in Chrome in UIs with a VerticalLayout and a Toolbar (#…
…17251) Change-Id: Ice7b1c37a4235e60f65c4788d5117b520189a6f5
- Loading branch information
Juho Nurminen
committed
Mar 27, 2015
1 parent
f21ef0a
commit 9ca2979
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...-touchkit-agpl/src/test/java/com/vaadin/addon/touchkit/itest/VerticalLayoutScrolling.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.vaadin.addon.touchkit.itest; | ||
|
||
import com.vaadin.addon.touchkit.AbstractTouchKitIntegrationTest; | ||
import com.vaadin.addon.touchkit.ui.NavigationButton; | ||
import com.vaadin.addon.touchkit.ui.NavigationManager; | ||
import com.vaadin.addon.touchkit.ui.NavigationView; | ||
import com.vaadin.addon.touchkit.ui.Toolbar; | ||
import com.vaadin.addon.touchkit.ui.VerticalComponentGroup; | ||
import com.vaadin.ui.Button; | ||
import com.vaadin.ui.VerticalLayout; | ||
|
||
public class VerticalLayoutScrolling extends AbstractTouchKitIntegrationTest { | ||
|
||
public VerticalLayoutScrolling() { | ||
setDescription("Displays a VerticalLayout inside a NavigationView to test scrolling and issue #17251"); | ||
|
||
final NavigationManager layout = new NavigationManager(); | ||
addComponent(layout); | ||
layout.setSizeFull(); | ||
|
||
layout.setCurrentComponent(new NavigationTestView()); | ||
} | ||
|
||
public static class NavigationTestView extends NavigationView { | ||
|
||
public NavigationTestView() { | ||
|
||
final VerticalLayout vl = new VerticalLayout(); | ||
vl.setMargin(true); | ||
setContent(vl); | ||
|
||
final VerticalComponentGroup g = new VerticalComponentGroup(); | ||
vl.addComponent(g); | ||
|
||
for (int i = 0; i < 100; i++) { | ||
g.addComponent(new NavigationButton("test")); | ||
} | ||
|
||
getNavigationBar().setCaption("List"); | ||
setToolbar(new Toolbar() { | ||
{ | ||
addComponent(new Button("dadasd")); | ||
} | ||
}); | ||
} | ||
} | ||
} |