Select to view content in your preferred language

A Little Help Please? (Part Deux)

3941
2
05-04-2015 02:25 PM
LarryStout
Deactivated User

I have all new code to detect mouse and touch.  This time, I've tested on iOS, and Chrome, FireFox, IE, and Safari on Windows 7 without touch and on Windows 8.1 with touch (Surface Tablet).  The code has gotten bigger, and I am nearing the edge of sanity.

This is pretty simple.  The hasMouse and hasTouch above the Scalebar Widget will show undefined until a mouse or touch is detected.  The order shouldn't matter.  I appreciate all who will help with this test.

TestApp

Thanks,

Larry

0 Kudos
2 Replies
TomSellsted
MVP Regular Contributor

Larry,

Tested on my Windows 7 PC on:

Chrome 42.0.2311.135 m - hasMouse: true, hasTouch: undefined

Chrome mobile iPad emulator: hasMouse: undefined, hasTouch: true

Internet Explorer 11: hasMouse: true, hasTouch: undefined

FireFox 36.0.4: hasMouse:true, hasTouch: undefined

Tested on my iPad:

Safari: hasMouse: undefined, hasTouch:true

Chrome: hasMouse: undefined, hasTouch:true

Very nice!

Regards,

Tom

RobertScheitlin__GISP
MVP Emeritus

Larry,

   Tested on Lenovo ThinkPad (Android 4.0.x)

   Device is touch enabled

   Device has mouse

Your test reports true to both accurately.