[Libreoffice-commits] online.git: loleaflet/css loleaflet/html loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 31 17:35:40 UTC 2020


 loleaflet/css/menubar.css        |   10 ++++++++++
 loleaflet/html/loleaflet.html.m4 |    2 +-
 loleaflet/src/map/Map.js         |   10 ----------
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 7e992e4d4f43cd61f66d84f8ca0fc55937a84bb8
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Mar 31 20:03:59 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Mar 31 19:35:20 2020 +0200

    Hopefully better fix for the missing w2ui-scroll-right in iOS app on iPad
    
    Revert more of b62dcc025555076a7522809b9f12f873c278205d, and also
    revert 418181411f9af3fe4280a0874e6affaf990e0d7e.
    
    Now I seem to get a visualViewport with scale 1 and width 768
    consistently, which is a relief.
    
    Change-Id: Ia619a51047dd2a05ba32d6a203c3095198d3b4d5
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91436
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/loleaflet/css/menubar.css b/loleaflet/css/menubar.css
index 37ba4d121..1f52f4048 100644
--- a/loleaflet/css/menubar.css
+++ b/loleaflet/css/menubar.css
@@ -156,6 +156,7 @@
 .main-menu-btn {
     margin: 2px 10px;
     position: relative;
+    display: none;
     width: 17px;
     height: 21px;
     text-indent: 17px;
@@ -269,6 +270,15 @@
 	display: none;
     }
 
+    /* hide the menu in mobile view */
+    #main-menu-state:not(:checked) ~ #main-menu {
+        display: none;
+    }
+
+    .main-menu-btn {
+        display: inline-block;
+    }
+
     .main-nav {
         position: absolute;
         height: 0;
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 94aedb73f..84fd50b15 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, maximum-scale=1.0, minimum-scale=1.0">
+<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
 
 <script>
 m4_dnl# Define MOBILEAPP as true if this is either for the iOS app or for the gtk+ "app" testbed
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index af4967ae2..744966962 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -225,16 +225,6 @@ L.Map = L.Evented.extend({
 				this._size = new L.Point(0,0);
 				this._onResize();
 				this._socket.sendMessage('uno .uno:LOKSetMobile');
-				// Add a style sheet for mobile phones. Doing it here is hopefully more
-				// reliable that relying on CSS media queries looking at the window or device size.
-				var style = document.createElement('style');
-				style.innerHTML = '  \
-/* Hide the menu bar in a horribly convoluted way */ \
-#main-menu-state:not(:checked) ~ #main-menu {        \
-    display: none;                                   \
-}                                                    \
-';
-				document.head.appendChild(style);
 			}
 		});
 		this.on('updatetoolbarcommandvalues', function(e) {


More information about the Libreoffice-commits mailing list