dragndrop.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  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":"https://html5doctor.com/native-drag-and-drop/",
  9. "title":"HTML5 Doctor article"
  10. },
  11. {
  12. "url":"https://nettutsplus.s3.amazonaws.com/64_html5dragdrop/demo/index.html",
  13. "title":"Shopping cart demo"
  14. },
  15. {
  16. "url":"https://webplatform.github.io/docs/dom/DragEvent",
  17. "title":"WebPlatform Docs"
  18. },
  19. {
  20. "url":"https://github.com/MihaiValentin/setDragImage-IE",
  21. "title":"Polyfill for setDragImage in IE"
  22. },
  23. {
  24. "url":"https://github.com/timruffles/ios-html5-drag-drop-shim",
  25. "title":"iOS/Android shim for HTML 5 drag'n'drop"
  26. }
  27. ],
  28. "bugs":[
  29. {
  30. "description":"Chrome strips out newlines from `text/uri-list` [see bug](https://code.google.com/p/chromium/issues/detail?id=239745)"
  31. },
  32. {
  33. "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."
  34. },
  35. {
  36. "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)"
  37. },
  38. {
  39. "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)"
  40. },
  41. {
  42. "description":"In Firefox, the `dragstart` event does not fire on `button` elements. This effectively disables drag and drop for `button` elements."
  43. },
  44. {
  45. "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)."
  46. },
  47. {
  48. "description":"In Safari 8, after setting `event.dataTransfer.dropEffect`, the value in the `drop` event is always `'none'`"
  49. },
  50. {
  51. "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."
  52. },
  53. {
  54. "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)."
  55. }
  56. ],
  57. "categories":[
  58. "HTML5"
  59. ],
  60. "stats":{
  61. "ie":{
  62. "5.5":"a #1 #3",
  63. "6":"a #1 #3",
  64. "7":"a #1 #3",
  65. "8":"a #1 #3",
  66. "9":"a #1 #3",
  67. "10":"a #2 #3",
  68. "11":"a #2 #3"
  69. },
  70. "edge":{
  71. "12":"a #2",
  72. "13":"a #2",
  73. "14":"a #2",
  74. "15":"a #2",
  75. "16":"a #2",
  76. "17":"a #2",
  77. "18":"y",
  78. "79":"y",
  79. "80":"y",
  80. "81":"y",
  81. "83":"y",
  82. "84":"y",
  83. "85":"y",
  84. "86":"y",
  85. "87":"y",
  86. "88":"y",
  87. "89":"y",
  88. "90":"y",
  89. "91":"y",
  90. "92":"y",
  91. "93":"y",
  92. "94":"y",
  93. "95":"y",
  94. "96":"y",
  95. "97":"y",
  96. "98":"y",
  97. "99":"y",
  98. "100":"y",
  99. "101":"y",
  100. "102":"y",
  101. "103":"y",
  102. "104":"y",
  103. "105":"y",
  104. "106":"y",
  105. "107":"y",
  106. "108":"y",
  107. "109":"y",
  108. "110":"y",
  109. "111":"y",
  110. "112":"y",
  111. "113":"y",
  112. "114":"y",
  113. "115":"y",
  114. "116":"y",
  115. "117":"y",
  116. "118":"y",
  117. "119":"y",
  118. "120":"y"
  119. },
  120. "firefox":{
  121. "2":"p",
  122. "3":"p",
  123. "3.5":"y",
  124. "3.6":"y",
  125. "4":"y",
  126. "5":"y",
  127. "6":"y",
  128. "7":"y",
  129. "8":"y",
  130. "9":"y",
  131. "10":"y",
  132. "11":"y",
  133. "12":"y",
  134. "13":"y",
  135. "14":"y",
  136. "15":"y",
  137. "16":"y",
  138. "17":"y",
  139. "18":"y",
  140. "19":"y",
  141. "20":"y",
  142. "21":"y",
  143. "22":"y",
  144. "23":"y",
  145. "24":"y",
  146. "25":"y",
  147. "26":"y",
  148. "27":"y",
  149. "28":"y",
  150. "29":"y",
  151. "30":"y",
  152. "31":"y",
  153. "32":"y",
  154. "33":"y",
  155. "34":"y",
  156. "35":"y",
  157. "36":"y",
  158. "37":"y",
  159. "38":"y",
  160. "39":"y",
  161. "40":"y",
  162. "41":"y",
  163. "42":"y",
  164. "43":"y",
  165. "44":"y",
  166. "45":"y",
  167. "46":"y",
  168. "47":"y",
  169. "48":"y",
  170. "49":"y",
  171. "50":"y",
  172. "51":"y",
  173. "52":"y",
  174. "53":"y",
  175. "54":"y",
  176. "55":"y",
  177. "56":"y",
  178. "57":"y",
  179. "58":"y",
  180. "59":"y",
  181. "60":"y",
  182. "61":"y",
  183. "62":"y",
  184. "63":"y",
  185. "64":"y",
  186. "65":"y",
  187. "66":"y",
  188. "67":"y",
  189. "68":"y",
  190. "69":"y",
  191. "70":"y",
  192. "71":"y",
  193. "72":"y",
  194. "73":"y",
  195. "74":"y",
  196. "75":"y",
  197. "76":"y",
  198. "77":"y",
  199. "78":"y",
  200. "79":"y",
  201. "80":"y",
  202. "81":"y",
  203. "82":"y",
  204. "83":"y",
  205. "84":"y",
  206. "85":"y",
  207. "86":"y",
  208. "87":"y",
  209. "88":"y",
  210. "89":"y",
  211. "90":"y",
  212. "91":"y",
  213. "92":"y",
  214. "93":"y",
  215. "94":"y",
  216. "95":"y",
  217. "96":"y",
  218. "97":"y",
  219. "98":"y",
  220. "99":"y",
  221. "100":"y",
  222. "101":"y",
  223. "102":"y",
  224. "103":"y",
  225. "104":"y",
  226. "105":"y",
  227. "106":"y",
  228. "107":"y",
  229. "108":"y",
  230. "109":"y",
  231. "110":"y",
  232. "111":"y",
  233. "112":"y",
  234. "113":"y",
  235. "114":"y",
  236. "115":"y",
  237. "116":"y",
  238. "117":"y",
  239. "118":"y",
  240. "119":"y",
  241. "120":"y",
  242. "121":"y",
  243. "122":"y",
  244. "123":"y"
  245. },
  246. "chrome":{
  247. "4":"y",
  248. "5":"y",
  249. "6":"y",
  250. "7":"y",
  251. "8":"y",
  252. "9":"y",
  253. "10":"y",
  254. "11":"y",
  255. "12":"y",
  256. "13":"y",
  257. "14":"y",
  258. "15":"y",
  259. "16":"y",
  260. "17":"y",
  261. "18":"y",
  262. "19":"y",
  263. "20":"y",
  264. "21":"y",
  265. "22":"y",
  266. "23":"y",
  267. "24":"y",
  268. "25":"y",
  269. "26":"y",
  270. "27":"y",
  271. "28":"y",
  272. "29":"y",
  273. "30":"y",
  274. "31":"y",
  275. "32":"y",
  276. "33":"y",
  277. "34":"y",
  278. "35":"y",
  279. "36":"y",
  280. "37":"y",
  281. "38":"y",
  282. "39":"y",
  283. "40":"y",
  284. "41":"y",
  285. "42":"y",
  286. "43":"y",
  287. "44":"y",
  288. "45":"y",
  289. "46":"y",
  290. "47":"y",
  291. "48":"y",
  292. "49":"y",
  293. "50":"y",
  294. "51":"y",
  295. "52":"y",
  296. "53":"y",
  297. "54":"y",
  298. "55":"y",
  299. "56":"y",
  300. "57":"y",
  301. "58":"y",
  302. "59":"y",
  303. "60":"y",
  304. "61":"y",
  305. "62":"y",
  306. "63":"y",
  307. "64":"y",
  308. "65":"y",
  309. "66":"y",
  310. "67":"y",
  311. "68":"y",
  312. "69":"y",
  313. "70":"y",
  314. "71":"y",
  315. "72":"y",
  316. "73":"y",
  317. "74":"y",
  318. "75":"y",
  319. "76":"y",
  320. "77":"y",
  321. "78":"y",
  322. "79":"y",
  323. "80":"y",
  324. "81":"y",
  325. "83":"y",
  326. "84":"y",
  327. "85":"y",
  328. "86":"y",
  329. "87":"y",
  330. "88":"y",
  331. "89":"y",
  332. "90":"y",
  333. "91":"y",
  334. "92":"y",
  335. "93":"y",
  336. "94":"y",
  337. "95":"y",
  338. "96":"y",
  339. "97":"y",
  340. "98":"y",
  341. "99":"y",
  342. "100":"y",
  343. "101":"y",
  344. "102":"y",
  345. "103":"y",
  346. "104":"y",
  347. "105":"y",
  348. "106":"y",
  349. "107":"y",
  350. "108":"y",
  351. "109":"y",
  352. "110":"y",
  353. "111":"y",
  354. "112":"y",
  355. "113":"y",
  356. "114":"y",
  357. "115":"y",
  358. "116":"y",
  359. "117":"y",
  360. "118":"y",
  361. "119":"y",
  362. "120":"y",
  363. "121":"y",
  364. "122":"y",
  365. "123":"y"
  366. },
  367. "safari":{
  368. "3.1":"y",
  369. "3.2":"y",
  370. "4":"y",
  371. "5":"y",
  372. "5.1":"y",
  373. "6":"y",
  374. "6.1":"y",
  375. "7":"y",
  376. "7.1":"y",
  377. "8":"y",
  378. "9":"y",
  379. "9.1":"y",
  380. "10":"y",
  381. "10.1":"y",
  382. "11":"y",
  383. "11.1":"y",
  384. "12":"y",
  385. "12.1":"y",
  386. "13":"y",
  387. "13.1":"y",
  388. "14":"y",
  389. "14.1":"y",
  390. "15":"y",
  391. "15.1":"y",
  392. "15.2-15.3":"y",
  393. "15.4":"y",
  394. "15.5":"y",
  395. "15.6":"y",
  396. "16.0":"y",
  397. "16.1":"y",
  398. "16.2":"y",
  399. "16.3":"y",
  400. "16.4":"y",
  401. "16.5":"y",
  402. "16.6":"y",
  403. "17.0":"y",
  404. "17.1":"y",
  405. "17.2":"y",
  406. "TP":"y"
  407. },
  408. "opera":{
  409. "9":"p",
  410. "9.5-9.6":"p",
  411. "10.0-10.1":"p",
  412. "10.5":"p",
  413. "10.6":"p",
  414. "11":"p",
  415. "11.1":"p",
  416. "11.5":"p",
  417. "11.6":"p",
  418. "12":"y",
  419. "12.1":"y",
  420. "15":"y",
  421. "16":"y",
  422. "17":"y",
  423. "18":"y",
  424. "19":"y",
  425. "20":"y",
  426. "21":"y",
  427. "22":"y",
  428. "23":"y",
  429. "24":"y",
  430. "25":"y",
  431. "26":"y",
  432. "27":"y",
  433. "28":"y",
  434. "29":"y",
  435. "30":"y",
  436. "31":"y",
  437. "32":"y",
  438. "33":"y",
  439. "34":"y",
  440. "35":"y",
  441. "36":"y",
  442. "37":"y",
  443. "38":"y",
  444. "39":"y",
  445. "40":"y",
  446. "41":"y",
  447. "42":"y",
  448. "43":"y",
  449. "44":"y",
  450. "45":"y",
  451. "46":"y",
  452. "47":"y",
  453. "48":"y",
  454. "49":"y",
  455. "50":"y",
  456. "51":"y",
  457. "52":"y",
  458. "53":"y",
  459. "54":"y",
  460. "55":"y",
  461. "56":"y",
  462. "57":"y",
  463. "58":"y",
  464. "60":"y",
  465. "62":"y",
  466. "63":"y",
  467. "64":"y",
  468. "65":"y",
  469. "66":"y",
  470. "67":"y",
  471. "68":"y",
  472. "69":"y",
  473. "70":"y",
  474. "71":"y",
  475. "72":"y",
  476. "73":"y",
  477. "74":"y",
  478. "75":"y",
  479. "76":"y",
  480. "77":"y",
  481. "78":"y",
  482. "79":"y",
  483. "80":"y",
  484. "81":"y",
  485. "82":"y",
  486. "83":"y",
  487. "84":"y",
  488. "85":"y",
  489. "86":"y",
  490. "87":"y",
  491. "88":"y",
  492. "89":"y",
  493. "90":"y",
  494. "91":"y",
  495. "92":"y",
  496. "93":"y",
  497. "94":"y",
  498. "95":"y",
  499. "96":"y",
  500. "97":"y",
  501. "98":"y",
  502. "99":"y",
  503. "100":"y",
  504. "101":"y",
  505. "102":"y",
  506. "103":"y",
  507. "104":"y"
  508. },
  509. "ios_saf":{
  510. "3.2":"n",
  511. "4.0-4.1":"n",
  512. "4.2-4.3":"n",
  513. "5.0-5.1":"n",
  514. "6.0-6.1":"n",
  515. "7.0-7.1":"n",
  516. "8":"n",
  517. "8.1-8.4":"n",
  518. "9.0-9.2":"n",
  519. "9.3":"n",
  520. "10.0-10.2":"n",
  521. "10.3":"n",
  522. "11.0-11.2":"n",
  523. "11.3-11.4":"n",
  524. "12.0-12.1":"n",
  525. "12.2-12.5":"n",
  526. "13.0-13.1":"n",
  527. "13.2":"n",
  528. "13.3":"n",
  529. "13.4-13.7":"n",
  530. "14.0-14.4":"n",
  531. "14.5-14.8":"n",
  532. "15.0-15.1":"y",
  533. "15.2-15.3":"y",
  534. "15.4":"y",
  535. "15.5":"y",
  536. "15.6-15.7":"y",
  537. "16.0":"y",
  538. "16.1":"y",
  539. "16.2":"y",
  540. "16.3":"y",
  541. "16.4":"y",
  542. "16.5":"y",
  543. "16.6-16.7":"y",
  544. "17.0":"y",
  545. "17.1":"y",
  546. "17.2":"y"
  547. },
  548. "op_mini":{
  549. "all":"n"
  550. },
  551. "android":{
  552. "2.1":"n",
  553. "2.2":"n",
  554. "2.3":"n",
  555. "3":"n",
  556. "4":"n",
  557. "4.1":"n",
  558. "4.2-4.3":"n",
  559. "4.4":"n",
  560. "4.4.3-4.4.4":"n",
  561. "119":"y #4"
  562. },
  563. "bb":{
  564. "7":"n",
  565. "10":"n"
  566. },
  567. "op_mob":{
  568. "10":"p",
  569. "11":"p",
  570. "11.1":"p",
  571. "11.5":"p",
  572. "12":"p",
  573. "12.1":"y",
  574. "73":"y #4"
  575. },
  576. "and_chr":{
  577. "119":"y #4"
  578. },
  579. "and_ff":{
  580. "119":"n"
  581. },
  582. "ie_mob":{
  583. "10":"y",
  584. "11":"y"
  585. },
  586. "and_uc":{
  587. "15.5":"y #4"
  588. },
  589. "samsung":{
  590. "4":"n",
  591. "5.0-5.4":"n",
  592. "6.2-6.4":"n",
  593. "7.2-7.4":"n",
  594. "8.2":"n",
  595. "9.2":"n",
  596. "10.1":"n",
  597. "11.1-11.2":"n",
  598. "12.0":"n",
  599. "13.0":"n",
  600. "14.0":"n",
  601. "15.0":"n",
  602. "16.0":"n",
  603. "17.0":"n",
  604. "18.0":"n",
  605. "19.0":"n",
  606. "20":"n",
  607. "21":"n",
  608. "22":"n",
  609. "23":"n"
  610. },
  611. "and_qq":{
  612. "13.1":"y"
  613. },
  614. "baidu":{
  615. "13.18":"n"
  616. },
  617. "kaios":{
  618. "2.5":"n",
  619. "3.0-3.1":"n"
  620. }
  621. },
  622. "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`.",
  623. "notes_by_num":{
  624. "1":"Partial support refers to no support for the `dataTransfer.files` or `.types` objects",
  625. "2":"Partial support refers to not supporting `.setDragImage`",
  626. "3":"Partial support refers to limited supported formats for `dataTransfer.setData`/`getData`.",
  627. "4":"Not supported in Chromium browsers on Android 6 or older."
  628. },
  629. "usage_perc_y":94.03,
  630. "usage_perc_a":0.48,
  631. "ucprefix":false,
  632. "parent":"",
  633. "keywords":"draganddrop, draggable",
  634. "chrome_id":"",
  635. "shown":true
  636. }