Commit ffcd8663 authored by Alain Takoudjou's avatar Alain Takoudjou

Fix show chat button always hidden on mobile layout

The maximum device with for mobile layout in css is 1024px, for device with > 768 (Ipad)
chat button will stay hidded while chat box is also hidden when there is a video call.
This commit fix the issue.
parent b660bc40
......@@ -98,7 +98,9 @@
</div>
<div id="resizer"></div>
<div class="coln-right" id="right">
<span class="show-video blink" id="switch-video"><i class="fas fa-exchange" aria-hidden="true"></i></span>
<span class="show-video blink" id="switch-video">
<i class="fas fa-exchange-alt" aria-hidden="true"></i>
</span>
<div class="collapse-video" id="collapse-video">
<i class="far fa-comment-alt open-chat" title="Open chat"></i>
</div>
......
......@@ -40,6 +40,12 @@ let serverConnection;
let fallbackUserPass = null;
/* max-device-width which is defined in css for mobile layout */
/**
* @type {number}
*/
let mobileViewportWidth = 1024;
/**
* @param {string} username
* @param {string} password
......@@ -257,7 +263,7 @@ function showVideo() {
let width = window.innerWidth;
let video_container = document.getElementById('video-container');
video_container.classList.remove('no-video');
if (width <= 768)
if (width <= mobileViewportWidth)
document.getElementById('collapse-video').style.display = "block";
}
......@@ -2667,7 +2673,7 @@ document.getElementById('collapse-video').onclick = function(e) {
left.style.display = "block";
this.style.display = "";
}
if (width <= 768) {
if (width <= mobileViewportWidth) {
// fixed div for small screen
this.style.display = "";
hideVideo(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment