-
Notifications
You must be signed in to change notification settings - Fork 15
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
Chrome v59 on Windows detects touchOnly on desktop #8
Comments
Thanks for reporting. Much appreciated. I'm able to reproduce the Chrome v59 error on Windows, but Firefox v54 reads as |
@pnarielwala are you on a mouse only or hybrid windows machine? |
@RByers it looks like Chrome v59 on Windows is giving a weird response to the hover and pointer media queries. I'm on a Windows 10 hybrid (primarily a mouse device) |
@RAFREX I am on a mouse only windows machine |
And mozilla now reads as hybrid which is fine, but maybe browsers are moving towards not supporting window.matchMedia()? |
Maybe we could use window.navigator.userAgent instead? |
I don't think browsers are not going to support window.matchMedia(), as that would break many responsive websites (Firefox supports window.matchMedia), it is just the I'd prefer to only use |
So just checked this morning, and Chrome seemed to have fixed itself! I'll monitor it throughout the day and then close this issue |
Sorry for the delay. @darktears made some improvements in Chrome 59 on Windows here to try to better handle the convertible case. I.e. when in tablet mode we expect touch to be primary. But we rely on the OS to tell us when it's in tablet mode, so maybe that's not 100% reliable? Or perhaps we have some other issue? /cc @mustaqahmed. |
I've tested intensively with as much detachable and convertible devices I could get around me. However it seems like one scenario is not working. I'm still troubleshooting it as we speak https://bugs.chromium.org/p/chromium/issues/detail?id=739430 |
Great, thanks for the info. I'm on vacation until next week and will look into it more then. |
I just landed https://chromium.googlesource.com/chromium/src.git/+/6edbb267b6d43303d08e758ff63f941df5c8ff7f Can someone try a Canary build in the coming days and confirm it works fine. Then I can ask the patch to be backported in other branches. |
@darktears I just tested it with Canary (v62.0.3164.0) on an ASUS TP200S (with Windows 10) and it is not working ( Note that on this device, even when it is in tablet mode, the mouse still works. Maybe if the device is a non-detachable hybrid, then the |
@RAFREX provided it is this model https://www.asus.com/us/2-in-1-PCs/ASUS_Transformer_Book_Flip_TP200SA/ it's a convertible laptop? So it should supports screen rotation and CONVERTIBLESLATEMODE should be supported in the registry. I'm puzzled why your laptop was buggy in the first place. The issue I fixed here was about touch screen laptops only (not hybrid). What does https://googlechrome.github.io/samples/media-hover-pointer/ says? |
@darktears yea that's the one I have. I tried your link, but got the same results (see picture). The I'm not much with PCs (just have this one for testing purposes), but I'm happy to check something on it for you. |
@pnarielwala is it working fine for you on your mouse only machine? Are you able to test it out on other PCs/hybrids? Thanks. |
@RAFREX I can't access the hardware so I will make an experimental build of Chromium with some debug output so you can give me more infos. |
Hi @RAFREX, Can you try this build : https://drive.google.com/open?id=0B65HPC3GJ5tEWTNzMmpiWlRjMmM Unzip it, run chrome.exe from the terminal (say git bash) with --enable-logging --v=0 as parameters. Access https://googlechrome.github.io/samples/media-hover-pointer/ and tell me what is the debug output in the terminal. Thanks. |
@RAFREX : did you had time to check it out? |
@darktears sorry been really busy, hopefully will get to it today. Also, I have a friend with a ASUS Zenbook Pro UX501VW and it has the same issue. Don't know if you're able to access any ASUS convertible hardware, but might be worth a test if you can. |
I managed to grab an old ASUS T-100 and it behaves as expected. I really need the debug outputs to fix it further. I don't have access to any other ASUS laptops.... |
@darktears sorry for the delay on this and thanks for working to fix this issue. I downloaded the debug build, unziped it, and ran it from git bash after cding into its directory: Also of note, the debug build has the correct pointer and hover media query results. Where as canary still has the incorrect results. Not sure if this was intentional. |
@RAFREX well you should see some debug output. I'm puzzled about the fact you say the debug build returns the correct values. The debug build I sent you is basically master of Chromium with just few debug output, no functionality or behavior has been changed. Could you make sure your Canary is updated by going into the menu -> Help -> about Google Chrome. |
@darktears yes it's up to date. |
@RAFREX there is no difference between the debug build I gave you and the canary build in term of code related to interaction MQs so I don't understand here why you're seeing two different outputs. Are you sure Canary doesn't trick you with caching or something? Concerning the debug output could you check with cmd then chrome.exe --enable-logging --v=0. You have to see debug output because I'm debugging every single code path to detect the input type. |
@darktears I clean canary's cache, no change. Tried launching the dev build with the added .exe extension, but no log shows up. I'm not sure what's up. Are there any build steps that are added or are different between the dev build and canary build? |
Absolutely no difference (beside the branding) so I'm really puzzled here really. @RByers do you have a clue of what's going on here? |
@pnarielwala I patched this with a |
@RAFREX ok I figure out the differences. It was my bad when adding the debug stuff. Can you try https://drive.google.com/open?id=0B65HPC3GJ5tESFkwYzNBa3lXRjg again and tell me the debug output. You should see some for sure. |
@darktears here's the debug output. Also, the new dev build hover and pointer media queries match canary (i.e. are incorrect). [1820:7164:0821/140830.292:ERROR:win_util.cc(450)] ----Testing pointer devices---- |
@RAFREX sure this is what I am getting on my mouse-only computer (although the sub sections do change sometimes upon restarting my computer) |
@pnarielwala thanks. What's the model of your mouse-only computer? And what chrome version? This might be helpful for the Chromium team as the media query and touch event results are not what they should be. @darktears it looks like a mouse-only windows device is also giving incorrect hover and point media query results (they reflect a touch only device, see the subsections in @pnarielwala screenshot above). @RByers, @darktears it also seems like Note that Detect Touch Events |
@RAFREX I'm on a Lenovo T440s with Chrome Version 60.0.3112.101 (Official Build) (64-bit) |
Stable Chrome 60 doesn't have the fix mentioned above so @pnarielwala result seems consistent. I suggest @pnarielwala tests Canary to verify the fix. @RAFREX : Could you make sure you installed the latest ATK from Asus on https://www.asus.com/us/2-in-1-PCs/ASUS_Transformer_Book_Flip_TP200SA/HelpDesk_Download/. Restart after install. |
@darktears I installed the latest ATK and restarted. No change in the media query results. Also the debug output looks the same as before (I can paste it if you want). @pnarielwala can you post the same screen grab as before but using Chrome Canary? Thanks. |
@RAFREX based on the debug this is not Chrome's fault. We use https://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx GetSystemMetrics asking SM_CONVERTIBLESLATEMODE and your laptop returns that it's in slate mode (aka screen flipped and keyboard/trackpad disabled) when it's not. This is the last API we can use to detect if your laptop is a convertible. Previous tests are returning true for your hardware : it has a touch screen, it's not docked, and it supports rotation. So here is my question : when you flip over the screen does Windows 10 ask you if you want to switch to tablet mode (without user interaction)? You should see a popup close to the time in the taskbar, e.g. https://onmessages.files.wordpress.com/2016/02/image001.png (make sure that in the settings you want to be asked about it https://www.cybernetman.com/files/siteContent/editor/Pics/KB380/Settings.png). |
That should be true only when Windows reports there is a touchscreen present. There are a number of known situations where Windows will lie and claim there is a touchscreen when there is not (like when you have installed Visual Studio and it's fake touchscreen driver used to simulating a touch screen). |
@darktears I don't have that Asus TP200S anymore, but I recall that it didn't ask me if I wanted to enter tablet mode, even though in the settings I had indicated such. Which I agree indicates there is something wrong on Asus's end. My friend's Asus Zenbook Pro UX501VW started indicating the correct media query results in v62 (was only affected v59 - v61), so whatever you did in v62 helped. Also my new PC, a Lenovo Ideapad Flex 4 has the correct media query results. For the Lenovo Ideapad, when I switch from computer mode to tablet mode and refresh the page the media queries change as expected, but when I switch back from tablet mode to computer mode the media query results continue to indicate a touch only device after page refresh. I have to close and restart Chrome to get the correct media query results. Just some feedback for something to look into. As a side note, I'm not surprised that it's not Chrome's fault. Like a lot of frontend code I write it's not my fault all browsers don't implement things according to spec, but it's my responsibility to workaround browser deficiencies so my apps work. Just as I think it is Chrome's responsibility to work around computer deficiencies so that it works correctly. |
I'm going to close this issue and limit the workaround for |
Hey Rafael,
Just wanted to bring it to your attention that now Chrome v59 on windows doesn't correctly detect mouse (and mistakes it for touchOnly device) in addition to Firefox. Seems to only happen on Windows and Macs are fine
The text was updated successfully, but these errors were encountered: