diff options
author | Adam Wagner <wbadam@users.noreply.github.com> | 2017-05-17 16:28:53 +0300 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2017-05-17 16:28:53 +0300 |
commit | df360681ae33025f83415bfbc93391932ad13ed9 (patch) | |
tree | ceee93baa1494ea78307f6d21e653b4b48b56d83 /shared/src/main/java/com/vaadin | |
parent | 431debc477bc669a0a6c491e62ee7174ae883fd0 (diff) | |
download | vaadin-framework-df360681ae33025f83415bfbc93391932ad13ed9.tar.gz vaadin-framework-df360681ae33025f83415bfbc93391932ad13ed9.zip |
Fix DnD issues regarding data type text (#9347)
* First dragged data should not contain new line character at the beginning
* Return any of "text", "Text" or "text/plain" in the method of getDataTransferText()
* Set only data of type "text" for IE on dragstart
* Clarify return of getDataTransferText() method
* Ignore generated data that is null
Diffstat (limited to 'shared/src/main/java/com/vaadin')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceState.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceState.java b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceState.java index 66323a91c6..0fefd05665 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/dnd/DragSourceState.java @@ -45,6 +45,19 @@ public class DragSourceState extends SharedState { */ public static final String DATA_TYPE_TEXT = "text"; + /** + * Data type {@code "Text"}. IE 11 stores data dragged from the desktop as + * "Text" with capital letter. + */ + public static final String DATA_TYPE_TEXT_IE = "Text"; + + /** + * Data type {@code "text/plain"} for reading data from {@code DataTransfer} + * object. Some browsers convert store data with {@code "text"} as {@code + * "text/plain"} when transferring data. + */ + public static final String DATA_TYPE_TEXT_PLAIN = "text/plain"; + public static final String RESOURCE_DRAG_IMAGE = "drag-image"; /** |