HTML5 Drag/Drop appears broken in Dartium 1.7.2?

64 views
Skip to first unread message

Danny Tuppeny

unread,
Oct 24, 2014, 10:40:29 AM10/24/14
to mi...@dartlang.org
I've raised this as a bug; but thought it was worth posting here in case anyone had any ideas or workarounds.

After upgrading to Dartium from 1.7.2, my drag/drop appeared to stop working. After much tearing out of hair, I have come to the conclusion that this is a Dartium bug.

The following HTML and JavaScript (note: no Dart!), shows a div that turns red when you drag a file from explorer onto it in Chrome. In Dartium, it never fires the event.

<html>
<body>

<div id="dropzone"></div>

<style>
  #dropzone {
    width: 200px;
    height: 20px;
    background: blueviolet;
    margin-bottom: 10px;
    padding: 10px;
  }
</style>

<script>
  var dragged;

  document.getElementById('dropzone').addEventListener("dragenter", function( event ) {
      // store a ref. on the dragged elem
      dragged = event.target;
      // make it half transparent
      event.target.style.backgroundColor = 'red';
  }, false);
</script>

</body>
</html>

Danny Tuppeny

unread,
Oct 24, 2014, 2:37:09 PM10/24/14
to mi...@dartlang.org
Oh man, I just realised what this is... I'm not at a PC to test it, but...

I created a PowerShell command that launched Chromium...
I run PowerShell as Admin...
In Windows, you can't drag from a non-Admin process (Explorer) to a Admin process (Chromium)...

I'll try and confirm this when at a PC over the weekend; but this is likely user error. I likely didn't launch from PoSh previously (my command was new!). Sorry! :(

Günter Zöchbauer

unread,
Oct 24, 2014, 3:59:24 PM10/24/14
to mi...@dartlang.org
In bwu_datagrid HTML5 dnd stopped working with a recent update I think about 2 Weeks ago (bleeding edge) but I couldn't find time to investigate. Please report back about what you find out. 

Danny Tuppeny

unread,
Oct 25, 2014, 6:26:58 AM10/25/14
to mi...@dartlang.org
Confirmed this was user error! With Dartium running as Admin, you can't drag/drop from non-Admin processes in Windows. I blame Windows for not making it clear why this doesn't work!

To complicate reproducing this further, if you have an instance of Dartium already running as not-Admin, then try to launch as Admin seems to reuse the existing process (and therefore does not launch an Admin process). Not sure if this would be considered a bug, though I'll bet the same thing happens with Chrome.

--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

Reply all
Reply to author
Forward
0 new messages