Is HTML5 drag and drop compatible with Chrome Apps (packaged)?

733 views Asked by At

I've tried the traditional methods and it works as a webpage in Chrome, but not when I'm using the page as a packaged app.

I'm just doing this example from W3 for testing purposes since it's very simple. http://www.w3schools.com/html/html5_draganddrop.asp

2

There are 2 answers

0
CdnXxRRODxX On BEST ANSWER

I was able to get this to work by utilizing the -webkit-user-drag CSS property on the element (in my case an image). This allowed the dragging in the app window itself.

img {
-webkit-user-drag: auto;
}

I then put event listeners for all the other javascript functions (inline javascript not allowed in Chrome Apps) that can be seen at the w3 link in the description.

Now the drag and drop acts like it does on a regular webpage.

3
Remigius Stalder On

this is not supported in Chrome Android, see in caniuse: http://caniuse.com/#search=drag