Fyrd / caniuse

Raw browser/feature support data from caniuse.com
https://caniuse.com
Creative Commons Attribution 4.0 International
5.63k stars 1.38k forks source link

draggable option #1807

Closed RensBloom closed 4 years ago

RensBloom commented 9 years ago

There is an option to disable dragging of elements in HTML5 (draggable="false") as well as in CSS (-webkit-user-drag: none;). It would be great if these two could be added.

wemyss commented 8 years ago

+1

neoncitylights commented 8 years ago

+1

shankarsridhar commented 8 years ago

+1

martijn80 commented 8 years ago

+1

heavenorlasvegas commented 8 years ago

+1

joshgrift commented 6 years ago

+1

originalfoo commented 5 years ago

CSS 'user-drag' property

I don't have any info on hand as to which browsers or versions support those css properties. On caniuse, searching for the properties gives no results.

Permitted values:

Some additional infos:

Supported on these elements: a, abbr, acronym, address, b, bdo, big, blockquote, body, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, ins, isIndex, kbd, label, legend, li, marquee, menu, ol, p, pre, q, s, samp, small, span, strike, strong, sub, sup, table, td, textarea, th, tr, tt, u, ul, var, xmp

I assume it's supported on all elements.

Safari 3.0+

I assume earlier due to aforementioned -khtml-user-drag property.

Draggable element property

Part of the drag and drop API, the modern approach is the draggable attribute on elements:

  <div draggable="true">whole div will be dragged</div>
  <div draggable="false">you cannot drag this div or its text</div>

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable

Searching caniuse leads to a feature page: https://caniuse.com/#feat=dragndrop

It would be good if the component parts of the feature could get their own pages to promote collection of browser compatibility especially on mobile devices.

samrith-s commented 5 years ago

+1 to this as well.

Fyrd commented 4 years ago

Draggable attribute available at https://caniuse.com/#feat=mdn-html_global_attributes_draggable

Fyrd commented 3 years ago

-webkit-user-drag now available at https://caniuse.com/webkit-user-drag

broseph-juce commented 3 years ago

Hey, I'm new to github (literally signed up to post this) so apologies if commenting here like this is incorrect etiquette... I just thought you should be aware that I found the following info at stackoverflow, thought it might be of use:

-webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;

Original Post

Fyrd commented 3 years ago

@broseph-juce Thanks, I also ran into that in my research, however I couldn't find any evidence of browsers actually supporting the -moz-, -o- or the unprefixed version, so I think those were only ever included in the hopes that other browsers might adopt them (or just habit when writing prefixed properties). The -khtml- prefix is something of a legacy prefix that maps to -webkit-.