From 909ab5fa8e749741f55ac19a9312885fbfa77859 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 29 Mar 2015 14:18:31 -0400 Subject: [PATCH] Tweak mobile version media query --- assets/javascripts/app/app.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/app/app.coffee b/assets/javascripts/app/app.coffee index a5074d76..f94a35e5 100644 --- a/assets/javascripts/app/app.coffee +++ b/assets/javascripts/app/app.coffee @@ -211,7 +211,8 @@ try # Need to sniff the user agent because some Android and Windows Phone devices don't take # resolution (dpi) into account when reporting device width/height. - @_isMobile ?= (window.matchMedia('(max-device-width: 767px), (max-device-height: 767px)').matches) or + @_isMobile ?= (window.matchMedia('(max-device-width: 767px)').matches) or + (window.matchMedia('(max-device-height: 767px) and (max-device-width: 1024px)').matches) or (navigator.userAgent.indexOf('Android') isnt -1 and navigator.userAgent.indexOf('Mobile') isnt -1) or (navigator.userAgent.indexOf('IEMobile') isnt -1) catch