summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2014-09-14 12:49:23 +0300
committerVaadin Code Review <review@vaadin.com>2014-12-10 12:49:27 +0000
commitda91036c92d8088d02471bb939b21eb228638d8f (patch)
tree5cb6887ac458ffec8952988eb9002499db5f9585 /client
parentab9d395d3a380217d51b68a338382854bd6194e0 (diff)
downloadvaadin-framework-da91036c92d8088d02471bb939b21eb228638d8f.tar.gz
vaadin-framework-da91036c92d8088d02471bb939b21eb228638d8f.zip
Set explicit calculated size for drag image element (#14617).
Change-Id: I6bfcd0a5ad78bd79aad2fa2357a7e33a00b3c33d
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/dd/VDragEvent.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/dd/VDragEvent.java b/client/src/com/vaadin/client/ui/dd/VDragEvent.java
index 6291a38e42..45f89bdb87 100644
--- a/client/src/com/vaadin/client/ui/dd/VDragEvent.java
+++ b/client/src/com/vaadin/client/ui/dd/VDragEvent.java
@@ -244,6 +244,11 @@ public class VDragEvent {
public void createDragImage(com.google.gwt.user.client.Element element,
boolean alignImageToEvent) {
Element cloneNode = (Element) element.cloneNode(true);
+
+ // Set size explicitly for cloned node to avoid stretching #14617.
+ cloneNode.getStyle().setWidth(element.getOffsetWidth(), Unit.PX);
+ cloneNode.getStyle().setHeight(element.getOffsetHeight(), Unit.PX);
+
syncContent(element, cloneNode);
if (BrowserInfo.get().isIE()) {
if (cloneNode.getTagName().toLowerCase().equals("tr")) {