This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a commit to branch 
feature/OPENMEETINGS-2684-update-viewport-and-adjust-height
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 7e33756ba6d097604b1bc426e309d159787c9883
Author: Sebastian Wagner <[email protected]>
AuthorDate: Sun Oct 10 10:32:58 2021 +1300

    OPENMEETINGS-2684, OPENMEETINGS-2280 Apply viewport and fix height to 
adjust when resizing occurs for iOS/Mobile browsers.
---
 openmeetings-web/src/main/front/main/src/index.js                | 7 +++++++
 .../main/java/org/apache/openmeetings/web/pages/BasePage.html    | 1 +
 openmeetings-web/src/main/webapp/css/raw-general.css             | 9 ++++++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/openmeetings-web/src/main/front/main/src/index.js 
b/openmeetings-web/src/main/front/main/src/index.js
index 1e7e33f..05f03ec 100644
--- a/openmeetings-web/src/main/front/main/src/index.js
+++ b/openmeetings-web/src/main/front/main/src/index.js
@@ -20,3 +20,10 @@ Object.assign(window, {
                $('#busy-indicator').hide();
        }
 });
+function _updateResize() {
+       const doc = document.documentElement
+    doc.style.setProperty('--app-height', `${window.innerHeight}px`)
+}
+$(window).on('resize', _updateResize);
+//initial resize
+_updateResize();
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
index 3c0ec53..72b547a 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/BasePage.html
@@ -22,6 +22,7 @@
 <html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-9.xsd"; 
wicket:id="html">
 <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
+       <meta name="viewport" content="height=device-height, initial-scale=1, 
width=device-width, initial-scale=1" />
        <link rel="shortcut icon" href="public/favicon.png" type="image/png"/>
        <wicket:header-items/>
        <title wicket:id="pageTitle">[title]</title>
diff --git a/openmeetings-web/src/main/webapp/css/raw-general.css 
b/openmeetings-web/src/main/webapp/css/raw-general.css
index 35d38d8..e6e07d8 100644
--- a/openmeetings-web/src/main/webapp/css/raw-general.css
+++ b/openmeetings-web/src/main/webapp/css/raw-general.css
@@ -1,7 +1,14 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") 
http://www.apache.org/licenses/LICENSE-2.0 */
+:root {
+    --app-height: 100%;
+}
 html, body {
-       height: 100%;
+       width: 100vw;
+    height: var(--app-height);
+    /*height: 100%;
+       width: 100%;*/
        margin: 0;
+       padding: 0;
        font-family: Arial, Helvetica, sans-serif;
        overflow-y: hidden;
 }

Reply via email to