Skip to content

Commit

Permalink
Fix scrolling in Chrome in UIs with a VerticalLayout and a Toolbar (#…
Browse files Browse the repository at this point in the history
…17251)

Change-Id: Ice7b1c37a4235e60f65c4788d5117b520189a6f5
  • Loading branch information
Juho Nurminen committed Mar 27, 2015
1 parent f21ef0a commit 9ca2979
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ a {
right: 0;
border-top: windowBorder;
box-shadow: upperDropShadow;

/* workaround for a strange bug in chrome that breaks scrolling (#17251) */
z-index: 0;
}

.v-touchkit-navview-notoolbar .v-touchkit-navview-toolbar {
Expand Down
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"));
}
});
}
}
}

0 comments on commit 9ca2979

Please sign in to comment.