Skip to content

Commit 101e4cb

Browse files
committed
new mobile detection code for image iframe
1 parent 878881d commit 101e4cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mfr/extensions/image/templates/viewer.mako

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
$(document).ready(function() {
5454
5555
## Reference on how mobile is detected: https://stackoverflow.com/a/10364620
56-
var isMobile = window.matchMedia("only screen and (max-width: 760px)");
56+
## var isMobile = window.matchMedia("only screen and (max-width: 760px)");
57+
var isMobile = window.innerWidth <= 768;
5758
5859
## Enable the zoom feature only for desktop browsers
5960
if (!isMobile.matches) {

0 commit comments

Comments
 (0)