-
Notifications
You must be signed in to change notification settings - Fork 714
"Preview" of item during drag not visible - Chrome 50 on Mac #256
Comments
Here's a link to the page in my app that shows the issue - on any modern browser in Windows, everything works as expected (as far as I could tell), but Chrome on Mac does not (even Safari worked well): http://phpdraft-mattheworres.rhcloud.com/draft/3/depth_chart The cells of "picks" at the top of the depth charts are the draggable item, and the positions make up all the different lists. As long as a draft is still ongoing the depth charts are still draggable. |
I drag item with pure ReactJS without using this lib in my app , but I have the same problem after upgrade chrome to 50 on Mac OSX. You should set the div element attribute 'draggable' to true. |
@zhipengyan perfect! I figured it was something related to the HTML5 spec that Chrome was probably ahead of the game on. I bet as time goes on there's a good chance other browser vendors will adopt this as well. Nice! |
@marceljuenemann this
should probably be put somewhere in the README (I'd gladly open a PR to do so for you) but not quite sure where it makes sense to do so. Any ideas? As more folk upgrade their Chrome browsers, they'll probably see this as well. The more I think of it, the more it seems like a bug that the library could remedy by adding to the element itself. If I have time I'll open a PR. |
Adding draggable="true" doesn't solve the problem for me, my html markup is something like this:
If I remove the dnd-nodrag and dnd-handle elements the drag image is displayed correctly, but of course, I only want to be able to drag the whole |
I figured out that Chrome hides child elements with |
For me, even setting |
For me, applying |
Hi I had the same issue as @tfvictorino and applied the same workaround successfully. I'm a bit concerned though about this story. @mattheworres how did you find out about the draggable="true" workaround? |
Indeed that's a bug of Chromium introduced in Chrome 50 release. They changed the way ghost image is prepared by browser. They claim to have it fixed. Workarounds that work:
|
@N1kto where should those styles be applied? |
@Deklin to the DOM element you want to drag. Of course, you don't have to apply ALL of the listed styles. Any of those will work - it's just a matter of case/choice. |
I think I'm going to close this as it's mostly an issue in Chrome, and one that they have purported to have fixed. |
@N1kto Thanks, unfortunately no luck but if Chrome is going to be fixed, we'll wait it out. |
I recently worked on integrating your library into my project while on the Windows side of my machine - developing mainly on Chrome and Firefox. Both seemed to handle the library the same, which was great.
The feature is mostly done (hooray), and I went to check and see how it ran on the Mac OSX side of my machine. Firefox runs it great (I think the Mac implementation of the HTML5 spec is better - the "preview" of the draggable object on Mac is much better), and the latest version of Safari worked flawlessly as well.
The issue I saw started on Chrome 49. The "preview item", which on Mac ends up being a transparent drawing of the entire draggable object, ends up getting drawn to the left of the mouse cursor (on Firefox and Safari, it's drawn under the cursor according to where I grabbed it). After testing a little while, I noticed that depending on how close to the left-most pixel of the draggable I grabbed it with (so starting at an X of 0), the closer it was to the cursor (but the right-most boundary was still at least 20 pixels to the left of my cursor). So if I grabbed closest to the right-most boundary, it would be probably 200 pixels to the left of my cursor.
I noticed the latest Chrome you tested for 1.4 was 48, and decided to perhaps test 50 -- so I updated. Now Chrome won't even draw the preview object. The good news is that everything else (drag events, classes, etc.) all works perfectly and the library performs as needed, so this is only cosmetic.
I tested the demo site and did not see this issue there either. If it would be helpful I can put together a quick test site on OpenShift as the project I'm working on is an open source one, and then you can take a look yourself.
The text was updated successfully, but these errors were encountered: