[elm-discuss] Re: Get drag drop user interface to work in the Chrome browser with touch

2016-08-30 Thread OvermindDL1
> But they don't do me any good because I believe I need to do an e.preventDefault() or e.stopPropagation() or both. but I don't know how to do that from elm or even from inside the elm-lang/mouse code. You can't, currently, being able to conditionally do a preventDefault or stopPropagation on

[elm-discuss] Re: Get drag drop user interface to work in the Chrome browser with touch

2016-08-30 Thread Jonathan Duncan
I found a javascript hack to trigger mouse event for the first touch. http://stackoverflow.com/questions/8058699/drag-drop-on-mobile-devices-using-some-code-that-translates-event-code-included It does what I need to do even though it would've been nice to do it directly in Elm. Le lundi 29 aoĆ»

[elm-discuss] Re: Get drag drop user interface to work in the Chrome browser with touch

2016-08-30 Thread Jonathan Duncan
I need the touch events to be window wide. I need the position of the touch and the event attributes don't give me that. I managed to create some touch handlers like `elm-lang/mouse` I see that they are hooked up in the event listeners for the document. But they don't do me any good because

[elm-discuss] Re: Get drag drop user interface to work in the Chrome browser with touch

2016-08-30 Thread OvermindDL1
The way `elm-lang/mouse` works is by using the `elm-lang/dom` library at: http://package.elm-lang.org/packages/elm-lang/dom/latest That gives you the window context that you can register 'event handlers' on, thus you can use it to register your own window-wide events, such as the touch events,