Merge pull request #132 from sjcorbett/fix/composer-navigate-on-drop
Prevent Firefox from navigating to dropped entity icons in Composer
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 @@
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() {