Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fix the black stripe (another try)

yanasd9c3eec9a8d2
diff --git a/modules/UI/side_pannels/chat/Chat.js b/modules/UI/side_pannels/chat/Chat.js
index 00fe47dc71..33c5f0dc20 100644
--- a/modules/UI/side_pannels/chat/Chat.js
+++ b/modules/UI/side_pannels/chat/Chat.js
@@ -315,7 +315,7 @@ var Chat = {
* Indicates if the chat is currently visible.
*/
isVisible () {
- return $('#chatspace').is(":visible");
+ return UIUtil.isVisible(document.getElementById("chatspace"));
},
/**
* Shows and hides the window with the smileys
diff --git a/modules/UI/side_pannels/contactlist/ContactList.js b/modules/UI/side_pannels/contactlist/ContactList.js
index aa743afa9c..267b78d7e0 100644
--- a/modules/UI/side_pannels/contactlist/ContactList.js
+++ b/modules/UI/side_pannels/contactlist/ContactList.js
@@ -1,6 +1,7 @@
/* global $, APP */
import Avatar from '../../avatar/Avatar';
import UIEvents from '../../../../service/UI/UIEvents';
+import UIUtil from '../../util/UIUtil';
let numberOfContacts = 0;
let notificationInterval;
@@ -87,7 +88,7 @@ var ContactList = {
* otherwise
*/
isVisible () {
- return $('#contactlist').is(":visible");
+ return UIUtil.isVisible(document.getElementById("contactlist"));
},
/**
diff --git a/modules/UI/side_pannels/settings/SettingsMenu.js b/modules/UI/side_pannels/settings/SettingsMenu.js
index 266f10e785..ffebeaf20e 100644
--- a/modules/UI/side_pannels/settings/SettingsMenu.js
+++ b/modules/UI/side_pannels/settings/SettingsMenu.js
@@ -161,7 +161,7 @@ export default {
* @returns {boolean}
*/
isVisible () {
- return $('#settingsmenu').is(':visible');
+ return UIUtil.isVisible(document.getElementById("settingsmenu"));
},
/**
diff --git a/modules/UI/util/UIUtil.js b/modules/UI/util/UIUtil.js
index ab284805f8..4e3e381e32 100644
--- a/modules/UI/util/UIUtil.js
+++ b/modules/UI/util/UIUtil.js
@@ -155,7 +155,18 @@
return Object.keys(attrs).map(
key => ` ${key}="${attrs[key]}"`
).join(' ');
- }
+ },
+
+ /**
+ * Checks if the given DOM element is currently visible. The offsetParent
+ * will be null if the "display" property of the element or any of its
+ * parent containers is set to "none". This method will NOT check the
+ * visibility property though.
+ * @param {el} The DOM element we'd like to check for visibility
+ */
+ isVisible(el) {
+ return (el.offsetParent !== null);
+ }
};
export default UIUtil;