aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-02-12 08:23:07 +0000
committerVaadin Code Review <review@vaadin.com>2013-02-12 08:23:07 +0000
commit1dc26c018b29f92288e5d3cc7a424b3bdf9c0871 (patch)
tree45335219fee253435377883d9805cc2ec35cec76 /uitest/src/com/vaadin
parent97e44a9abf150690e03cd404d8b722f3c07ef6b3 (diff)
parent5f402ff7f4ebc646a247f1a9f3dfef6cc9580840 (diff)
downloadvaadin-framework-1dc26c018b29f92288e5d3cc7a424b3bdf9c0871.tar.gz
vaadin-framework-1dc26c018b29f92288e5d3cc7a424b3bdf9c0871.zip
Merge "Set the overlay container width and height to zero (#10860)" into 7.0
Diffstat (limited to 'uitest/src/com/vaadin')
-rw-r--r--uitest/src/com/vaadin/tests/overlays/OverlayTouchScrolling.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/overlays/OverlayTouchScrolling.java b/uitest/src/com/vaadin/tests/overlays/OverlayTouchScrolling.java
new file mode 100644
index 0000000000..fdcfdf7266
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/overlays/OverlayTouchScrolling.java
@@ -0,0 +1,56 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+
+package com.vaadin.tests.overlays;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Notification;
+
+public class OverlayTouchScrolling extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+
+ final CssLayout green = new CssLayout();
+ green.setSizeFull();
+ final CssLayout layout = new CssLayout() {
+ @Override
+ protected String getCss(Component c) {
+ return "background:green;";
+ }
+ };
+ layout.setSizeFull();
+ layout.addComponent(green);
+ setContent(layout);
+
+ Button button = new Button("Tap me with a touch device");
+ button.addClickListener(new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+
+ Notification
+ .show("Now close this and you can scroll in mad places.");
+ green.addComponent(new Label(
+ "Thank you for clicking, now scroll (with touch device) to area without green background, which shouldn't be possible."));
+ }
+ });
+ green.addComponent(button);
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Using overlays breaks top level scrolling on touch devices";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 10860;
+ }
+}