aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/base/common/common.css9
-rw-r--r--tests/testbench/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java43
2 files changed, 48 insertions, 4 deletions
diff --git a/WebContent/VAADIN/themes/base/common/common.css b/WebContent/VAADIN/themes/base/common/common.css
index 8734aee63f..74ed21bd1a 100644
--- a/WebContent/VAADIN/themes/base/common/common.css
+++ b/WebContent/VAADIN/themes/base/common/common.css
@@ -224,10 +224,11 @@ div.v-app-loading {
.v-drag-element {
z-index: 60000;
- position: absolute;
- opacity: 0.5;
- filter: alpha(opacity=50);
- cursor: default;
+ /* override any other position: properties */
+ position: absolute !important;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+ cursor: default;
}
.v-scrollable {
diff --git a/tests/testbench/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java b/tests/testbench/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
new file mode 100644
index 0000000000..9b2c03917c
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
@@ -0,0 +1,43 @@
+package com.vaadin.tests.components.draganddropwrapper;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.TestUtils;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.DragAndDropWrapper;
+import com.vaadin.ui.DragAndDropWrapper.DragStartMode;
+import com.vaadin.ui.Label;
+
+public class DragStartModes extends TestBase {
+
+ @Override
+ protected void setup() {
+
+ TestUtils.injectCSS(getMainWindow(),
+ ".v-ddwrapper { background: #ACF; }");
+
+ addComponent(makeWrapper(DragStartMode.NONE));
+ addComponent(makeWrapper(DragStartMode.COMPONENT));
+ addComponent(makeWrapper(DragStartMode.WRAPPER));
+ addComponent(makeWrapper(DragStartMode.HTML5));
+ }
+
+ private Component makeWrapper(DragStartMode mode) {
+ Label label = new Label("Drag start mode: " + mode);
+ DragAndDropWrapper wrapper = new DragAndDropWrapper(label);
+ wrapper.setHTML5DataFlavor("Text", "HTML5!");
+ wrapper.setDragStartMode(mode);
+ wrapper.setWidth("200px");
+ return wrapper;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Different drag start modes should show correct drag images";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 8949;
+ }
+
+}