React-dnd: Green plus sign in Chrome

Created on 18 Mar 2016  ·  22Comments  ·  Source: react-dnd/react-dnd

Has anyone figured out how to get rid of the green plus sign that pops up momentarily at the beginning of a drag operation in Chrome?

dnd quicktime player today at 8 24 18 pm

Most helpful comment

event.dataTransfer.dropEffect = 'none'
event.dataTransfer.effectAllowed = 'none'

This worked for me on chrome. Just put it in the "dragstart" and "dragend" events as those are the only ones that have access to the dataTransfer object.

All 22 comments

+1

Cannot reproduce this issue on Chrome 49 on Mac, or Chrome 49 on Windows on this page: http://gaearon.github.io/react-dnd/examples-drag-around-naive.html

Is this still happening for you? What version of Chrome are you using and which OS?

Also, can you control the cursor behaviour as described here: http://gaearon.github.io/react-dnd/examples-customize-drop-effects.html?

I'm seeing the issue in all the examples, on Chrome 49 on Mac (still 10.10). On drag start, the cursor changes to a green plus sign (usually displayed by cursor: copy); and then becomes the "move" cursor.

I'm able to reproduce this sporadically in the example you linked @globexdesigns (Chrome 49, OSX 10.11) -- it only appears for a split second before behaving as expected.

My guess is that it's either a short delay between React's batched render cycle and the browser's dnd implementation (in which case we might be able to fix it) or a bug in Chrome. I'll play around with other browsers (unless someone beats me to it) and see if I can get a repro there.

I'm seeing the same thing on Chrome 49 OSX 10.11.4 - appears for a split second then returns to normal. The behavior does not happen for me in Safari or Firefox.

@EvNaverniouk I'm on Chrome 49 and OS X 10.11.4 and yes, still seeing the issue, and yes, I see the copy copy icon when expected in this link that you referenced http://gaearon.github.io/react-dnd/examples-customize-drop-effects.html

Also seeing this issue in Chrome 50 on OS X 10.11.2.

also seeing this Chrome 51 on OS X 10.10.1

I'm also seeing this on Chrome Version 51 on OSX 10.11.4.

Edit: after adding some more functionality implementing a drag layer and properly including the code using connectDragPreview and getEmptyImage() the problem seems to have gone away for now.

I've seen this randomly in React DnD as well as other libraries and even just raw HTML5 draggable. My guess is that it has to do with us not setting effectAllowed in the dragstart.

Any updates on this? Facing the same issue on Chrome 53 OSX 10.10.5

Seeing the same thing Chrome 54.0.2840.71 10.11.6, any updates?

+1

Using {dropEffect: 'copy'} masks the problem (by making the green plus always visible); but doesn't properly fix it.

In addition, it seems {dropEffect: 'move'} doesn't appear to successfully make the cursor a 4-pointed cross-hair.

Chrome version: 55.0.2883.95 (Official Build) (64-bit)

Closing this issue as it does not seem to be a function of this library.

@fredguest did you ever find a solution to this?

@Yamikamisama sadly no.

The green plus button doesn't show up for me until my canDrop function returns false, then it appears.

event.dataTransfer.dropEffect = 'none'
event.dataTransfer.effectAllowed = 'none'

This worked for me on chrome. Just put it in the "dragstart" and "dragend" events as those are the only ones that have access to the dataTransfer object.

This didn't help me

event.dataTransfer.dropEffect = 'none'
event.dataTransfer.effectAllowed = 'none'

It happens only for a moment between cursor: 'grab' and cursor: 'grabbing'
It doesn't show in the gif format unfortunately but the pic below the gif shows the problem

greenplus

screen shot 2018-08-01 at 12 57 15 pm

I’m also experiencing this problem. It looks like a bug in Chrome.

+1

+1 chrome version 84.0.4147.89

edit: this only happens when using the following code to not have a preview image:

useEffect(() => {
    preview(getEmptyImage(), { captureDraggingState: true });
  }, [preview]);

implementing a preview solves this problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VienNguyen113 picture VienNguyen113  ·  4Comments

jsteel picture jsteel  ·  7Comments

mdietsche picture mdietsche  ·  5Comments

Kadrian picture Kadrian  ·  7Comments

xiaoshuangLi picture xiaoshuangLi  ·  6Comments