Detectizr icon indicating copy to clipboard operation
Detectizr copied to clipboard

Wrong device type for windows 8 touch laptop PC (IE only)

Open udaykanthr opened this issue 9 years ago • 5 comments

In windows 8 touch laptop, device type is detecting as tablet for IE browser, but expected is desktop.

for all other browsers device type is appearing correct value as "desktop"

udaykanthr avatar Sep 08 '14 09:09 udaykanthr

facing the same problem. Have pasted the useragent - “Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Tablet PC 2.0; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; McAfee; LCJB; rv:11.0) like Gecko”

rajchetan avatar Nov 25 '14 06:11 rajchetan

Windows has Tablet and Touch keywords in useragents of both tablet and touch enabled notebooks (hybrid devices). Do you know the right way to differentiate the Windows tablet and Windows touch enabled notebook?

barisaydinoglu avatar Jan 03 '15 14:01 barisaydinoglu

I have the same issue. I can't make the distinction between Windows tablet and Windows touch screen desktop. On my Windows 8.1 touch screen laptop, I have the following html tag in IE11 :

<html class="js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths tablet windows windows8 windows8_1 64bit ie ie11 ie11_0 trident fr-ca flash java landscape">

So, my laptop is detected as a tablet. Did you find a way to solve this ? Thanks!

jp-gauthier avatar Mar 31 '15 21:03 jp-gauthier

Actually I've found this topic which it makes more sense to me. Probably that small snippet will help us to idenfity if we are on a Tablet or on a Touchable Laptop.

The only problem is that I don't have a Surface where to test it, but maybe you can: http://stackoverflow.com/a/27069503

Anyway my output for this:

window.navigator.pointerEnabled ? "pointer" : "ontouchstart" in window ? "touch" : "mouse";

is pointer

//EDIT: Based on this: https://msdn.microsoft.com/en-us/library/windows/apps/hh972607.aspx

I think we have to change the If to this:

window.PointerEvent ? "pointer" : "ontouchstart" in window ? "touch" : "mouse";

which anyway outputs pointer

julianxhokaxhiu avatar Jun 24 '15 09:06 julianxhokaxhiu

that's great.

On Wed, Jun 24, 2015 at 2:57 PM, Julian Xhokaxhiu [email protected] wrote:

Actually I've found this topic which it makes more sense to me. Probably that small snippet will help us to idenfity if we are on a Tablet or on a Touchable Laptop.

The only problem is that I don't have a Surface where to test it, but maybe you can: http://stackoverflow.com/a/27069503

Anyway my output for this:

this.touchType = window.navigator.pointerEnabled ? "pointer" : "ontouchstart" in window ? "touch" : "mouse";

is pointer

— Reply to this email directly or view it on GitHub https://github.com/barisaydinoglu/Detectizr/issues/28#issuecomment-114803215 .

Chetan

rajchetan avatar Jun 24 '15 09:06 rajchetan