This is an automated email from the ASF dual-hosted git repository.

tbouron pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new 755e34e  Prevent Firefox from navigating to dropped entity icons
     new 77cfde1  Merge pull request #132 from 
sjcorbett/fix/composer-navigate-on-drop
755e34e is described below

commit 755e34edcf74f7f92a722279080931d7466feb85
Author: Sam Corbett <[email protected]>
AuthorDate: Wed May 1 16:48:16 2019 +0100

    Prevent Firefox from navigating to dropped entity icons
---
 ui-modules/blueprint-composer/app/components/util/d3-blueprint.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js 
b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
index b199ab0..2b9ecb5 100755
--- a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
+++ b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
@@ -836,7 +836,11 @@ export function D3Blueprint(container) {
                 onDragOver(d, `dropzone-self-${d.data._id}`);
             })
             .on('dragleave', (d) => (onDragLeave(d, 
`dropzone-self-${d.data._id}`)))
-            .on('drop', (d) => onExternalDrop(d, 
`dropzone-self-${d.data._id}`));
+            .on('drop', (d) => {
+                // Prevent the default to stop Firefox from navigating to the 
icon for the dropped entity.
+                d3.event.preventDefault();
+                onExternalDrop(d, `dropzone-self-${d.data._id}`)
+            });
     }
 
     function drawSpecNodeGroup() {

Reply via email to