aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/advanced/advanced-dragndrop.asciidoc
diff options
context:
space:
mode:
authorPekka Hyvönen <pekka@vaadin.com>2017-05-05 12:39:32 +0300
committerGitHub <noreply@github.com>2017-05-05 12:39:32 +0300
commit594cabd5f859bb66eebf16491a41ccd2f7d527cc (patch)
treef7a6690138de513804d40a3768ce2b2b7b5fe64b /documentation/advanced/advanced-dragndrop.asciidoc
parentf10c0dcc7ebbafccbf0e037432dc2c75949e8e67 (diff)
downloadvaadin-framework-594cabd5f859bb66eebf16491a41ccd2f7d527cc.tar.gz
vaadin-framework-594cabd5f859bb66eebf16491a41ccd2f7d527cc.zip
Fix HTML5 DnD regression for FF (#9245)
- Always set some drag data - Set the dropEffect on dragEnter and dragOver events on drop target - Send the dropEffect to server on drop event with disclaimer of current support - Remove _dragOverCriteria_ and use _dropCriteria_ for `dragenter`, `dragover` and `drop` criteria Tested manually basic DnD and Grid DnD on Mac with Chrome, Firefox, Safari. Safari is still missing drag image (regression). Tested manually basic DnD and Grid Dnd on Windows IE11 and Edge. Drop event for both is still not working properly #9174.
Diffstat (limited to 'documentation/advanced/advanced-dragndrop.asciidoc')
-rw-r--r--documentation/advanced/advanced-dragndrop.asciidoc9
1 files changed, 4 insertions, 5 deletions
diff --git a/documentation/advanced/advanced-dragndrop.asciidoc b/documentation/advanced/advanced-dragndrop.asciidoc
index 804224d317..bcdfb2343d 100644
--- a/documentation/advanced/advanced-dragndrop.asciidoc
+++ b/documentation/advanced/advanced-dragndrop.asciidoc
@@ -130,17 +130,16 @@ When data is dragged over a drop target, the __v-drag-over__ class name is appli
The __drop effect__ allows you to specify the desired drop effect, and for a succesful drop it must match the allowed effect that has been set for the drag source. Note that you can allow multiple effects, and that you should not rely on the default effect since it may vary between browsers.
-The __drag over criteria__ allows you determine whether the current drag source is allowed as a drop target, when the source is moved on top of the target. It is a script that is executed always when the `dragover` event is fired for the first time for this source, and returning `false` will prevent showing any drop effect. The script gets the `dragover` event as a parameter named `event`.
+The __drop criteria__ allows you to determine whether the current drag data can be dropped on the drop target. It is executed on `dragenter`, `dragover` and `drop` events. The script gets the current event as a parameter named `event`. Returning `false` will prevent the drop and no drop event is fired on the server side.
-The __drop criteria__ is similar to __drag over criteria__, but it is executed when the user has dropped the data by releasing the mouse button. The script gets the `drop` event as a parameter named `event`. Returning `false` will prevent the drop and no drop event is fired on the server side.
+////
+TODO Add an example of drop criteria
+////
=== CSS Style Rules
When dragging data over a drop target and the drag over criteria passes, a style name is applied to indicate that the element accepts drops. This style name is the primary style name with `-drag-center` suffix, e.g. `v-label-drag-center`.
-////
-TODO Add an example of drag over criteria and drop criteria
-////
===