locked
HTML5 dnd with draggable attribute does not show item being dragged in Metro App RRS feed

  • Question

  • Hi!

    I've been playing a little bit with HTML5 dnd support in Metro apps. I'm using the draggable attribute (just like in this example or this other one), but the Metro App does not show the contents following the mouse, the ítem that I'm dragging. It Works correctly when tested in IE10, so it is not an IE issue, but a specific Metro one.

    Is there any known bug or should we add some magic to the dnd effect?

    Thanks,

    Juanma


    Juan Manuel Servera
    twitter: @jmservera
    mi blog: http://jmservera.wordpress.com
    Únete al grupo de WP7 en LinkedIn
    MCPD WP7 Developer - MCTS Sharepoint 2010 Application Development

    Sunday, July 22, 2012 12:07 AM

Answers

All replies

  • Hi,

    I tried to copy the code (both main page and h5util.js) from the second sample to a Metro application, and removed code related to document.write. It seems the code worked fine on my side. I could drag and drop the items using a mouse (touching may not work at the moment due to a known limitation: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/664d6d45-bde7-499f-9a13-2b14c4ab5e52). I would like to suggest you to check whether there is missed some code, such as h5util.js in your project.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    Monday, July 23, 2012 5:10 PM
    Moderator
  • Hello Ming Xu,

    Thanks for your answer. I didn't explain it correctly. Drag and drop functionality is working, I can drag and drop things, but the dragged object is not shown while dragging like it happens in IE10. If you take a look to the picture below you will see that a copy of the item "one (drag me)" appears in the screen following the mouse while dragging it. In my Metro App it doesn't show, I've tried the same code as you proposed, but still the same effect.

    html5 dnd

    My question is, should we paint the element manually or is there any flag/attribute/function for providing this functionality?

    Thank you,

    Juanma


    Juan Manuel Servera
    twitter: @jmservera
    mi blog: http://jmservera.wordpress.com
    Únete al grupo de WP7 en LinkedIn
    MCPD WP7 Developer - MCTS Sharepoint 2010 Application Development

    Monday, July 23, 2012 7:09 PM
  • Hi Juan,

    You should not have to paint these items manually.  I will take a look at this and get back to you!

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, July 24, 2012 8:30 PM
    Moderator
  • Hi Juan,

    I found that there is a bug filed on this and you can look forward to it being fixed in the next release.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, July 25, 2012 1:02 PM
    Moderator