smartbanner.js
smartbanner.js copied to clipboard
Why app banner is displaying in laptop screens, 1440 X 734 / 1366 X 768?
What happens:
App banner is displaying in the some desktop screens.
What should happen: App banner should not display in the desktop screens.
Do you know if the desktop screen in question was a touchscreen?
@ain Yes
Hi ! I have the same problem with 1440 X 734 / 1366 X 768 but my desktop screen isn't a touchscreen. Any ideas ?
@CametDean I have resolved it by using this regex: ^.*(Windows NT|Intel Mac OS X).*$
.
Thank you !
Possibly related to #503, needs investigation and a better solution.
I've the same issue. Also on a Windows 11 laptop with touch enabled. On Edge, Chrome and Firefox.
Edge:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.69
Chrome:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Firefox:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
window.navigator.maxTouchPoints // 10
window.MSStream // undefined
This is still occurring. Was caused by #503 via commit 1e0607593e025c7d3d8ce5f9eea9ee282ec0a246 it seems. (granted I'm using v1.19.1, but the code that is causing this looks the same)
Dell Inspiron 15 7000 Windows 11 Chrome 120.0.6099.72 (Official Build) (64-bit)
window.navigator.userAgent;
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
window.navigator.maxTouchPoints;
10
maxTouchPoints
10
Just my opinions here:
- Assuming that a touch screen is
iOS
is a flaw... - Might be possible to rely on
window.navigator.platform
It returns'Win32'
in my case -- caniuse.com isn't responding at the moment for me to look at how safe this is to use...