-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable user dragging on images #996
Comments
I dunno how I feel about this. Doesn't this break some of the cool things that you can do with HTML5 (i.e. drag and drop images into a Gmail message from one window to another)? |
No, this prevents img tags themselves from being draggable. You can see an example of the problem by clicking and dragging the github logo at the top of the page. |
Why would you want to prevent people from saving the images to their HD by dragging it from the webpage onto their desktop? There are use cases for it, but I don’t think we should do this by default. |
Draggable images are a common user expectation. I use them all the time to save images to my desktop or open them in Photoshop. So, we're going to pass on this one. But thanks for the suggestion. |
here is a real world scenario. We are making a kiosk with no desktop, user is using touch and gestures for interaction. if they touch an image and drag we get a ghost image for dragging onto desktop which totally breaks the gesture interactions. On chrome -webkit-user-drag: none; totally fixes this issue, Mozilla is still broken as -moz-user-select: none; & user-drag: none; have no effect. |
That is a great reason to disable drag n drop on your site, not every site using h5bp |
For disabling user dragging on images
Just add
user-drag: none;
-moz-user-select: none;
-webkit-user-drag: none;
to the standart css.
I think that helps webpages react like they should
The text was updated successfully, but these errors were encountered: