Larry_Stout

A Little Help Please?

Discussion created by Larry_Stout on Apr 21, 2015
Latest reply on Apr 22, 2015 by rscheitlin

Thanks to all who replied.  I really do appreciate you!  Sorry for the code that didn't work very well.

 

I've rewritten my code that detects touch and mouse.  This time I'm not going to post until I've tested on the one device I can get my hands on: a Microsoft Surface tablet.  Look for A Little Help Please? [Part Deux] tomorrow if my Surface test goes well.

 

I've noticed more and more devices that have both touch screens and a mouse.  My research tells me this is either impossible or very difficult to detect.  I always love a challenge, so I wrote some code that I think will detect this.  I am using Dojo has('touch') to detect if the device has a touch screen.  This works on all of the devices I've tested.  The code to detect a mouse on a touch device is the tricky part, and I don't have access to any devices to test this on.  Here's how you can help if you have such a device.

 

I have a customized WAB Application.  In the lower left corner, above the scalebar, I am showing what devices I have detected:

 

Debug.PNG

 

1. Go to this link: MapViewer1.1-DEV-TEST-MOUSE

2. DO NOT USE YOUR MOUSE

3. Open some widgets, zoom, pan, tap a parcel, etc.

4. Verify that the debug reads as above: hasMouse: false (or undefined), hasTouch: true

5. NOW USE YOUR MOUSE

6. Verify that the debug reads: hasMouse: true, hasTouch: true

7. If the app doesn't detect the mouse or if there are any problems, let me know.

8. It would be cool to know the operating system and version (e.g. iOS 8.2, Android 4.1, Windows 8, etc.)

 

If the testing goes well, I plan to share the code for this with the community, but feel free to scrape it.  Acme/Widget/js, lines 207-237

 

Thanks,

 

Larry

Outcomes