R KiranKumar
R KiranKumar

Reputation: 835

Html5 Drag and drop in Android

I tried to implement a simple drag and drop in the Android browser with HTML5. When I try to drag an object only the screen scrolls and I cant drag anything in it. Is there any way to do this?

HTML is here :

 For drag:   

<div id="an-obj-12" draggable="true" ondragstart="drag(event)" dropzone="copy">42a</div>
<div id="an-obj-13"  draggable="true" ondragstart="drag(event)" dropzone="copy">4a</div>
<div id="an-obj-14"  draggable="true" ondragstart="drag(event)" dropzone="copy">14</div>

For drop:

<div id="an-obj-7" ondrop="drop(event,'12a^2')" ondragover="allowDrop(event)"></div>
<div id="an-obj-8" ondrop="drop(event,'42a')" ondragover="allowDrop(event)"></div>
<div id="an-obj-9" ondrop="drop(event,'4a')" ondragover="allowDrop(event)"></div>

Upvotes: 7

Views: 3477

Answers (1)

Ghislain
Ghislain

Reputation: 11

HTML5 Drag&Drop is not supported in Android Browser : http://caniuse.com/#search=drag

You can use a third party js library to emulate that, like jquery ui

but you have to add a plugin to enable drag&drop on mobile this jquery ui plugin works great on Android browser : http://touchpunch.furf.com/

Have fun

Upvotes: 1

Related Questions