[Libreoffice-commits] online.git: loleaflet/html
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 31 11:11:20 UTC 2020
loleaflet/html/loleaflet.html.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 418181411f9af3fe4280a0874e6affaf990e0d7e
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 31 13:27:08 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Mar 31 13:11:02 2020 +0200
Add maximum-scale=1.0, minimum-scale=1.0 to the viewport meta tag
This seems to make the w2ui-scroll-right button appear every time, as
expected, on my 9.7" iPad Pro running the latest iPadOS. I don't fully
understand why and how, though... (It used to appear only maybe a
third of the times when one opened a text document.)
My naïve expectation would have been that having maximum-scale=1.0,
minimum-scale=1.0 in the viewport meta tag would have caused the
visualViewport object's scale attribute to be 1, and its width x height
to be 768 x 1024, i.e. exactly the same as the CSS pixel size,
screen.width x screen.height. Or at least that visualViewport.width
would have been 768. But no. visualViewport.scale is now *either*
0.9481481313705444 or 0.9733840227127075, with width x height being
correspondingly either 810 x 1059 or 789 x 1031.
Note that scale * width in both cases *does* equal the CSS pixel
width, 768. Presumably in the height direction it excludes the status
bar (the one with time, date, mobile data, WiFi, and battery state).
This change fixes the problem only in the iOS app on iPad, though, not
in Safari on iPad, against a "make run". (No idea whether the issue
with the missing w2ui-scroll-right button is even reproducible in the
Android app or in an Android browser on an Android tablet.)
Change-Id: I0735d0a79bdfe31775f694e11b3215e784ebd798
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91410
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 84fd50b15..94aedb73f 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -10,7 +10,7 @@ m4_define(_YEAR_,m4_esyscmd(date +%Y|tr -d '\n'))
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Online Editor</title>
<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
+<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<script>
m4_dnl# Define MOBILEAPP as true if this is either for the iOS app or for the gtk+ "app" testbed
More information about the Libreoffice-commits
mailing list