mcFrax / omicron-dnd

Fast JavaScript drag-and-drop library for desktop and mobile browsers.
MIT License
4 stars 0 forks source link

Consistent browser support, IE 11 support, UC support? #5

Open mcFrax opened 2 years ago

mcFrax commented 2 years ago

At the moment, IE would break at least because of an arrow function (but it's trivial to remove). Also, style.msUserSelect is not set where necessary (only style.userSelect and style.webkitUserSelect).

The examples use modules and the test page uses async and other stuff that would fail in IE.

UC doesn't support PointerEvents, so that would have to be handled (and may require a fallback for pointerenter/pointerleave - elementFromPoint is supported) and quite a few features show as "unknown".

~Current code is tested in Chrome 97, FF 96, Edge 97, Android Chrome 97, iOS 14, so it works pretty much everywhere we care about.

As for required JS/CSS features, this should be complete-enough list. https://caniuse.com/pointer,mdn-api_element_getclientrects,arrow-functions,getcomputedstyle,mdn-css_properties_user-select,transforms2d,requestanimationframe,classlist,es6-module,navigator

(I'm not sure what typescript is going to do about mdn-javascript_builtins_symbol)

Biggest actually unsupported browsers are: old iOS (1.2% global users according to caniuse.com), Opera Mini (1.06%) and UC (0.96%), out of which Opera Mini is out of question (no requestAnimationFrame) and both old iOS and UC seem to be missing just pointerevents - so a fallback for pointerevents seems like a development maybe worth consideration. IE is not really missing anything, just needs adding this ms-prefix in 1 or 2 places.