Merge pull request #596 from jitsi/fix-black-stripe

Fix the black stripe (another try)
This commit is contained in:
lyubomir 2016-04-08 11:13:12 -05:00
commit 28bac7b329
4 changed files with 16 additions and 4 deletions

View File

@ -315,7 +315,7 @@ var Chat = {
* Indicates if the chat is currently visible. * Indicates if the chat is currently visible.
*/ */
isVisible () { isVisible () {
return $('#chatspace').is(":visible"); return UIUtil.isVisible(document.getElementById("chatspace"));
}, },
/** /**
* Shows and hides the window with the smileys * Shows and hides the window with the smileys

View File

@ -1,6 +1,7 @@
/* global $, APP */ /* global $, APP */
import Avatar from '../../avatar/Avatar'; import Avatar from '../../avatar/Avatar';
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
import UIUtil from '../../util/UIUtil';
let numberOfContacts = 0; let numberOfContacts = 0;
let notificationInterval; let notificationInterval;
@ -87,7 +88,7 @@ var ContactList = {
* otherwise * otherwise
*/ */
isVisible () { isVisible () {
return $('#contactlist').is(":visible"); return UIUtil.isVisible(document.getElementById("contactlist"));
}, },
/** /**

View File

@ -161,7 +161,7 @@ export default {
* @returns {boolean} * @returns {boolean}
*/ */
isVisible () { isVisible () {
return $('#settingsmenu').is(':visible'); return UIUtil.isVisible(document.getElementById("settingsmenu"));
}, },
/** /**

View File

@ -155,7 +155,18 @@
return Object.keys(attrs).map( return Object.keys(attrs).map(
key => ` ${key}="${attrs[key]}"` key => ` ${key}="${attrs[key]}"`
).join(' '); ).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; export default UIUtil;