dragndrop.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. {
  2. "title":"Drag and Drop",
  3. "description":"Method of easily dragging and dropping elements on a page, requiring minimal JavaScript.",
  4. "spec":"https://html.spec.whatwg.org/multipage/interaction.html#dnd",
  5. "status":"ls",
  6. "links":[
  7. {
  8. "url":"http://html5doctor.com/native-drag-and-drop/",
  9. "title":"HTML5 Doctor article"
  10. },
  11. {
  12. "url":"http://nettutsplus.s3.amazonaws.com/64_html5dragdrop/demo/index.html",
  13. "title":"Shopping cart demo"
  14. },
  15. {
  16. "url":"http://html5demos.com/drag",
  17. "title":"Demo with link blocks"
  18. },
  19. {
  20. "url":"https://www.webplatform.org/docs/dom/DragEvent",
  21. "title":"WebPlatform Docs"
  22. },
  23. {
  24. "url":"https://github.com/MihaiValentin/setDragImage-IE",
  25. "title":"Polyfill for setDragImage in IE"
  26. },
  27. {
  28. "url":"http://blog.teamtreehouse.com/implementing-native-drag-and-drop",
  29. "title":"Implementing Native Drag and Drop"
  30. },
  31. {
  32. "url":"https://github.com/timruffles/ios-html5-drag-drop-shim",
  33. "title":"iOS/Android shim for HTML 5 drag'n'drop"
  34. },
  35. {
  36. "url":"https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6542268-setdragimage-on-datatransfer-of-dragevent",
  37. "title":"Microsoft Edge setDragImage feature request on UserVoice"
  38. }
  39. ],
  40. "bugs":[
  41. {
  42. "description":"Chrome strips out newlines from `text/uri-list` [see bug](https://code.google.com/p/chromium/issues/detail?id=239745)"
  43. },
  44. {
  45. "description":"In Chrome, `DataTransfer.addElement` is not implemented. There is no other way to implement a draggable object which updates during the drag due to some other circumstances (e.g. changes color on a valid drop spot), as it is just a static image if `addElement` is not supported."
  46. },
  47. {
  48. "description":"In Firefox, an element won't drag unless the `dragstart` handler sets `dataTransfer` data (even if it doesn't get retrieved). [Test case](https://codepen.io/michai/pen/NwORqO)"
  49. },
  50. {
  51. "description":"In Firefox, drag and drop does not work when the page is served as `application/xhtml+xml` [Mozilla Bug #751778](https://bugzilla.mozilla.org/show_bug.cgi?id=751778), [Mozilla Bug #1106160](https://bugzilla.mozilla.org/show_bug.cgi?id=1106160)"
  52. },
  53. {
  54. "description":"In Firefox, the `dragstart` event does not fire on `button` elements. This effectively disables drag and drop for `button` elements."
  55. },
  56. {
  57. "description":"Safari doesn't implement the `DragEvent` interface. It adds a `dataTransfer` property to `MouseEvent` instead. See [WebKit bug #103423](https://bugs.webkit.org/show_bug.cgi?id=103423)."
  58. },
  59. {
  60. "description":"In Safari 8, after setting `event.dataTransfer.dropEffect`, the value in the `drop` event is always `'none'`"
  61. },
  62. {
  63. "description":"In IE9-10, the `draggable` attribute could be effectively applied for `a` and `img` elements. For `div` and `span` elements you should call `element.dragDrop()` to start drag event."
  64. },
  65. {
  66. "description":"In IE9-11, using `\"text/plain\"` as the format for `event.dataTransfer.setData` and `event.dataTransfer.getData` reportedly does not work and causes a JS error. The format needs to be `\"text\"`, which seems to work in all the mainstream browsers (Chrome, Safari, Firefox, IE9-11, Edge)."
  67. }
  68. ],
  69. "categories":[
  70. "HTML5"
  71. ],
  72. "stats":{
  73. "ie":{
  74. "5.5":"a #1 #3",
  75. "6":"a #1 #3",
  76. "7":"a #1 #3",
  77. "8":"a #1 #3",
  78. "9":"a #1 #3",
  79. "10":"a #2 #3",
  80. "11":"a #2 #3"
  81. },
  82. "edge":{
  83. "12":"a #2",
  84. "13":"a #2",
  85. "14":"a #2",
  86. "15":"a #2",
  87. "16":"a #2",
  88. "17":"a #2",
  89. "18":"y",
  90. "79":"y",
  91. "80":"y",
  92. "81":"y",
  93. "83":"y",
  94. "84":"y",
  95. "85":"y",
  96. "86":"y"
  97. },
  98. "firefox":{
  99. "2":"p",
  100. "3":"p",
  101. "3.5":"y",
  102. "3.6":"y",
  103. "4":"y",
  104. "5":"y",
  105. "6":"y",
  106. "7":"y",
  107. "8":"y",
  108. "9":"y",
  109. "10":"y",
  110. "11":"y",
  111. "12":"y",
  112. "13":"y",
  113. "14":"y",
  114. "15":"y",
  115. "16":"y",
  116. "17":"y",
  117. "18":"y",
  118. "19":"y",
  119. "20":"y",
  120. "21":"y",
  121. "22":"y",
  122. "23":"y",
  123. "24":"y",
  124. "25":"y",
  125. "26":"y",
  126. "27":"y",
  127. "28":"y",
  128. "29":"y",
  129. "30":"y",
  130. "31":"y",
  131. "32":"y",
  132. "33":"y",
  133. "34":"y",
  134. "35":"y",
  135. "36":"y",
  136. "37":"y",
  137. "38":"y",
  138. "39":"y",
  139. "40":"y",
  140. "41":"y",
  141. "42":"y",
  142. "43":"y",
  143. "44":"y",
  144. "45":"y",
  145. "46":"y",
  146. "47":"y",
  147. "48":"y",
  148. "49":"y",
  149. "50":"y",
  150. "51":"y",
  151. "52":"y",
  152. "53":"y",
  153. "54":"y",
  154. "55":"y",
  155. "56":"y",
  156. "57":"y",
  157. "58":"y",
  158. "59":"y",
  159. "60":"y",
  160. "61":"y",
  161. "62":"y",
  162. "63":"y",
  163. "64":"y",
  164. "65":"y",
  165. "66":"y",
  166. "67":"y",
  167. "68":"y",
  168. "69":"y",
  169. "70":"y",
  170. "71":"y",
  171. "72":"y",
  172. "73":"y",
  173. "74":"y",
  174. "75":"y",
  175. "76":"y",
  176. "77":"y",
  177. "78":"y",
  178. "79":"y",
  179. "80":"y",
  180. "81":"y",
  181. "82":"y",
  182. "83":"y"
  183. },
  184. "chrome":{
  185. "4":"y",
  186. "5":"y",
  187. "6":"y",
  188. "7":"y",
  189. "8":"y",
  190. "9":"y",
  191. "10":"y",
  192. "11":"y",
  193. "12":"y",
  194. "13":"y",
  195. "14":"y",
  196. "15":"y",
  197. "16":"y",
  198. "17":"y",
  199. "18":"y",
  200. "19":"y",
  201. "20":"y",
  202. "21":"y",
  203. "22":"y",
  204. "23":"y",
  205. "24":"y",
  206. "25":"y",
  207. "26":"y",
  208. "27":"y",
  209. "28":"y",
  210. "29":"y",
  211. "30":"y",
  212. "31":"y",
  213. "32":"y",
  214. "33":"y",
  215. "34":"y",
  216. "35":"y",
  217. "36":"y",
  218. "37":"y",
  219. "38":"y",
  220. "39":"y",
  221. "40":"y",
  222. "41":"y",
  223. "42":"y",
  224. "43":"y",
  225. "44":"y",
  226. "45":"y",
  227. "46":"y",
  228. "47":"y",
  229. "48":"y",
  230. "49":"y",
  231. "50":"y",
  232. "51":"y",
  233. "52":"y",
  234. "53":"y",
  235. "54":"y",
  236. "55":"y",
  237. "56":"y",
  238. "57":"y",
  239. "58":"y",
  240. "59":"y",
  241. "60":"y",
  242. "61":"y",
  243. "62":"y",
  244. "63":"y",
  245. "64":"y",
  246. "65":"y",
  247. "66":"y",
  248. "67":"y",
  249. "68":"y",
  250. "69":"y",
  251. "70":"y",
  252. "71":"y",
  253. "72":"y",
  254. "73":"y",
  255. "74":"y",
  256. "75":"y",
  257. "76":"y",
  258. "77":"y",
  259. "78":"y",
  260. "79":"y",
  261. "80":"y",
  262. "81":"y",
  263. "83":"y",
  264. "84":"y",
  265. "85":"y",
  266. "86":"y",
  267. "87":"y",
  268. "88":"y",
  269. "89":"y"
  270. },
  271. "safari":{
  272. "3.1":"y",
  273. "3.2":"y",
  274. "4":"y",
  275. "5":"y",
  276. "5.1":"y",
  277. "6":"y",
  278. "6.1":"y",
  279. "7":"y",
  280. "7.1":"y",
  281. "8":"y",
  282. "9":"y",
  283. "9.1":"y",
  284. "10":"y",
  285. "10.1":"y",
  286. "11":"y",
  287. "11.1":"y",
  288. "12":"y",
  289. "12.1":"y",
  290. "13":"y",
  291. "13.1":"y",
  292. "14":"y",
  293. "TP":"y"
  294. },
  295. "opera":{
  296. "9":"p",
  297. "9.5-9.6":"p",
  298. "10.0-10.1":"p",
  299. "10.5":"p",
  300. "10.6":"p",
  301. "11":"p",
  302. "11.1":"p",
  303. "11.5":"p",
  304. "11.6":"p",
  305. "12":"y",
  306. "12.1":"y",
  307. "15":"y",
  308. "16":"y",
  309. "17":"y",
  310. "18":"y",
  311. "19":"y",
  312. "20":"y",
  313. "21":"y",
  314. "22":"y",
  315. "23":"y",
  316. "24":"y",
  317. "25":"y",
  318. "26":"y",
  319. "27":"y",
  320. "28":"y",
  321. "29":"y",
  322. "30":"y",
  323. "31":"y",
  324. "32":"y",
  325. "33":"y",
  326. "34":"y",
  327. "35":"y",
  328. "36":"y",
  329. "37":"y",
  330. "38":"y",
  331. "39":"y",
  332. "40":"y",
  333. "41":"y",
  334. "42":"y",
  335. "43":"y",
  336. "44":"y",
  337. "45":"y",
  338. "46":"y",
  339. "47":"y",
  340. "48":"y",
  341. "49":"y",
  342. "50":"y",
  343. "51":"y",
  344. "52":"y",
  345. "53":"y",
  346. "54":"y",
  347. "55":"y",
  348. "56":"y",
  349. "57":"y",
  350. "58":"y",
  351. "60":"y",
  352. "62":"y",
  353. "63":"y",
  354. "64":"y",
  355. "65":"y",
  356. "66":"y",
  357. "67":"y",
  358. "68":"y",
  359. "69":"y",
  360. "70":"y",
  361. "71":"y"
  362. },
  363. "ios_saf":{
  364. "3.2":"n",
  365. "4.0-4.1":"n",
  366. "4.2-4.3":"n",
  367. "5.0-5.1":"n",
  368. "6.0-6.1":"n",
  369. "7.0-7.1":"n",
  370. "8":"n",
  371. "8.1-8.4":"n",
  372. "9.0-9.2":"n",
  373. "9.3":"n",
  374. "10.0-10.2":"n",
  375. "10.3":"n",
  376. "11.0-11.2":"n",
  377. "11.3-11.4":"n",
  378. "12.0-12.1":"n",
  379. "12.2-12.4":"n",
  380. "13.0-13.1":"n",
  381. "13.2":"n",
  382. "13.3":"n",
  383. "13.4-13.7":"n",
  384. "14":"n"
  385. },
  386. "op_mini":{
  387. "all":"n"
  388. },
  389. "android":{
  390. "2.1":"n",
  391. "2.2":"n",
  392. "2.3":"n",
  393. "3":"n",
  394. "4":"n",
  395. "4.1":"n",
  396. "4.2-4.3":"n",
  397. "4.4":"n",
  398. "4.4.3-4.4.4":"n",
  399. "81":"y #4"
  400. },
  401. "bb":{
  402. "7":"n",
  403. "10":"n"
  404. },
  405. "op_mob":{
  406. "10":"p",
  407. "11":"p",
  408. "11.1":"p",
  409. "11.5":"p",
  410. "12":"p",
  411. "12.1":"y",
  412. "59":"y #4"
  413. },
  414. "and_chr":{
  415. "85":"y #4"
  416. },
  417. "and_ff":{
  418. "79":"n"
  419. },
  420. "ie_mob":{
  421. "10":"y",
  422. "11":"y"
  423. },
  424. "and_uc":{
  425. "12.12":"n"
  426. },
  427. "samsung":{
  428. "4":"n",
  429. "5.0-5.4":"n",
  430. "6.2-6.4":"n",
  431. "7.2-7.4":"n",
  432. "8.2":"n",
  433. "9.2":"n",
  434. "10.1":"n",
  435. "11.1-11.2":"n",
  436. "12.0":"n"
  437. },
  438. "and_qq":{
  439. "10.4":"y"
  440. },
  441. "baidu":{
  442. "7.12":"n"
  443. },
  444. "kaios":{
  445. "2.5":"n"
  446. }
  447. },
  448. "notes":"`dataTransfer.items` only supported by Chrome.\r\n\r\nCurrently no browser supports the `dropzone` attribute.\r\n\r\nFirefox supports any kind of DOM elements for `.setDragImage`. Chrome must have either an `HTMLImageElement` or any kind of DOM Element attached to the DOM _and within the viewport_ of the browser for `.setDragImage`.",
  449. "notes_by_num":{
  450. "1":"Partial support refers to no support for the `dataTransfer.files` or `.types` objects",
  451. "2":"Partial support refers to not supporting `.setDragImage`",
  452. "3":"Partial support refers to limited supported formats for `dataTransfer.setData`/`getData`.",
  453. "4":"Not supported in Chromium browsers on Android 6 or older."
  454. },
  455. "usage_perc_y":79.8,
  456. "usage_perc_a":1.68,
  457. "ucprefix":false,
  458. "parent":"",
  459. "keywords":"draganddrop, draggable",
  460. "ie_id":"",
  461. "chrome_id":"",
  462. "firefox_id":"",
  463. "webkit_id":"",
  464. "shown":true
  465. }