
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
dragdroptouch-bug-fixed
Advanced tools
Polyfill that enables HTML5 drag drop support on mobile (touch) devices
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Polyfill that enables HTML5 drag drop support on mobile (touch) devices.
Important!
This repository is basically a series of refactorings of the original dragdroptouch in order to make it TypeScript-compatible and fix its bugs more easily (some of them have already been fixed).
The resulating NPM package has been published with the name "dragdroptouch-bug-fixed"
(Original description follows)
The HTML5 specification includes support for drag and drop operations. Unfortunately, most mobile browsers do not implement it, so applications that rely on HTML5 drag and drop have reduced functionality when running on mobile devices.
The DragDropTouch class is a polyfill that translates touch events into standard HTML5 drag drop events. If you add the polyfill to your pages, drag and drop operations should work on mobile devices just like they do on the desktop.
The demo should work on desktop as well as on mobile devices, including iPads and Android tablets.
The top section of the demo is based on a well-known HTML5 drag and drop sample available here:
The following sections demonstrate how the polyfill works with standards-based components that use HTML5 drag and drop. You can use touch to resize and reorder grid columns, data groups, and pivot fields.
Add the DragDropTouch.js polyfill to your page to enable drag and drop on mobile devices:
<script src="DragDropTouch.js"></script>
The DragDropTouch polyfill attaches listeners to the document's touch events:
To avoid interfering with the automatic browser translation of some touch events into mouse events, the polyfill performs a few additional tasks:
Thanks to Eric Bidelman for the great tutorial on HTML5 drag and drop: [Native HTML5 Drag and Drop] (http://www.html5rocks.com/en/tutorials/dnd/basics/).
Thanks also to Chris Wilson and Paul Kinlan for their article on mouse and touch events: [Touch And Mouse] (http://www.html5rocks.com/en/mobile/touchandmouse/).
Finally, thanks to Tim Ruffles for his iOS shim code which was inspiring: [iOS DragDrop Shim] (https://github.com/timruffles/ios-html5-drag-drop-shim).
FAQs
Polyfill that enables HTML5 drag drop support on mobile (touch) devices
The npm package dragdroptouch-bug-fixed receives a total of 135 weekly downloads. As such, dragdroptouch-bug-fixed popularity was classified as not popular.
We found that dragdroptouch-bug-fixed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.