Merge pull request #778 from jitsi/fix-toolbar-hide

Fixes the check whether we are hovering over the toolbar.
This commit is contained in:
yanas 2016-08-09 18:04:04 -05:00 committed by GitHub
commit 7c89f2b7d1
1 changed files with 8 additions and 2 deletions

View File

@ -428,15 +428,21 @@ const Toolbar = {
/**
* Indicates if the toolbar is currently hovered.
* @return {true} if the toolbar is currently hovered, {false} otherwise
* @return {boolean} true if the toolbar is currently hovered,
* false otherwise
*/
isHovered() {
var hovered = false;
this.toolbarSelector.find('*').each(function () {
let id = $(this).attr('id');
if ($(`#${id}:hover`).length > 0) {
return true;
hovered = true;
// break each
return false;
}
});
if (hovered)
return true;
if ($("#bottomToolbar:hover").length > 0) {
return true;
}