Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
udaykanthr opened this issue Sep 8, 2014 · 5 comments
Open

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

udaykanthr opened this issue Sep 8, 2014 · 5 comments
Assignees

Comments

@udaykanthr
Copy link

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"

@rajchetan
Copy link

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”

@barisaydinoglu barisaydinoglu self-assigned this Nov 26, 2014
@barisaydinoglu
Copy link
Owner

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?

@jp-gauthier
Copy link

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!

@julianxhokaxhiu
Copy link

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

@rajchetan
Copy link

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
#28 (comment)
.

Chetan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants