locked
Strange Problems with MSGesture Events and Image Elements in WinJS App RRS feed

  • Question

  • Update: The problem seems to be isolated to running Metro WinJS apps in "Local Machine" Mode. Swiping over images in the simulator seems to work as expected. Still a bit strange IMO.

    My App allows the user to navigate between articles by flicking them to the left or right to navigate to the previous or next article.

    The gestures are handled by creating an MSGesture object and relaying pointer events fired by the container element hosting the articles an its children to the MSGesture object using addPointer.

    This works fine as long as the gesture does not hit an image element in the content (which I do not control obviously). Since this is easier shown than explained, here's a video demonstrating my problem:

    http://www.youtube.com/watch?v=KjzYF3hqDwI

    Any suggestions would be appreciated.


    weichhold.com



    Thursday, July 26, 2012 7:42 PM

All replies

  • Hi Oliver,

    Can you provide a simple repro of what you are doing for further investigation?  Again, a physical touch device does not work but the simulator with touch emulated does?

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 27, 2012 12:30 PM
    Moderator
  • Hi Oliver,

    Can you provide a simple repro of what you are doing for further investigation?  Again, a physical touch device does not work but the simulator with touch emulated does?

    -Jeff


    Jeff Sanders (MSFT)

    Simulator works. Touch hardware should work as well (don't have access to it).

    Touch gestures captured using the MGesture object work in general in "Local" mode on a non-touch machine - just not for images. 


    weichhold.com

    Friday, July 27, 2012 12:34 PM
  • I cannot duplicate the problem sorry.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 27, 2012 2:16 PM
    Moderator
  • I cannot duplicate the problem sorry.

    -Jeff


    Jeff Sanders (MSFT)

    You've watched the Video?

    weichhold.com

    Friday, July 27, 2012 2:18 PM
  • Hi Oliver,

    I did thanks!  A video of your problem is a bit like taking a video of your car driving down the street showing how something is not working (the windows aren't rolling up).  Without knowing what you are doing or how you are trying to do it, it is impossible to try and determine what the problem is.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 27, 2012 2:22 PM
    Moderator
  • Hi Oliver,

    Academic questions still are important to understanding the ecosystem!  If you would like to connect and share your app for further investigation please contact me here:  http://blogs.msdn.com/jpsanders/contact.aspx

    -Jeff


    Jeff Sanders (MSFT)

    Friday, July 27, 2012 2:26 PM
    Moderator
  • Hi Oliver,

    I did thanks!  A video of your problem is a bit like taking a video of your car driving down the street showing how something is not working (the windows aren't rolling up).  Without knowing what you are doing or how you are trying to do it, it is impossible to try and determine what the problem is.

    -Jeff


    Jeff Sanders (MSFT)

    I know Jeff. Thanks for trying to reproduce it anyway. Appreciate it. But like I said. Since this is only happening in Local Mode which isn't supposed to be using touch input this is more an academical issue. 

    I now suspect the browser's drag & drop code kicking in and consuming the events which is is hinted by the mouse cursor turning into a stop sign - exactly what happens when you try dragging an image element in most browsers.


    weichhold.com



    weichhold.com

    Friday, July 27, 2012 2:28 PM