Is there an add-on or extension to emulate touch events?

To develop and debug mobile and tablet applications, I would like my mouse to emulate touchstart, touchmove, and touchhend.

I found two possibilities:

Phantom Limb http://www.vodori.com/blog/phantom-limb.html (doesn't seem to work)

ChromeTouch https://chrome.google.com/webstore/detail/ncegfehgjifmmpnjaihnjpbpddjjebme (Scrolls the page but does not raise touch events)

Does anyone know of an addon that will trigger touch events in the webkit browser on the desktop?

+7
source share
1 answer

The only thing I found to do touchmove was to do something manually, encoded as follows:

(function(){ var isDown = false , dragging ; $('body').bind('mousedown', function(){ isDown = true; }); $('body').bind('mousemove', function(){ if(isDown) { dragging(); } }); $('body').bind('touchmove', function(){ dragging(); }); $('body').bind('mouseup', function(){ isDown = false; }); dragging = function () { console.log('content being drug'); } })(); 
+2
source

All Articles