Fixes the check whether we are hovering over the toolbar.

This commit is contained in:
damencho 2016-08-09 17:39:24 -05:00
parent a50a980de4
commit 2c39514359
1 changed files with 8 additions and 2 deletions
modules/UI/toolbars

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;
}