瀏覽代碼

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

Fixes the check whether we are hovering over the toolbar.
master
yanas 9 年之前
父節點
當前提交
7c89f2b7d1
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8
    2
      modules/UI/toolbars/Toolbar.js

+ 8
- 2
modules/UI/toolbars/Toolbar.js 查看文件

428
 
428
 
429
     /**
429
     /**
430
      * Indicates if the toolbar is currently hovered.
430
      * Indicates if the toolbar is currently hovered.
431
-     * @return {true} if the toolbar is currently hovered, {false} otherwise
431
+     * @return {boolean} true if the toolbar is currently hovered,
432
+     * false otherwise
432
      */
433
      */
433
     isHovered() {
434
     isHovered() {
435
+        var hovered = false;
434
         this.toolbarSelector.find('*').each(function () {
436
         this.toolbarSelector.find('*').each(function () {
435
             let id = $(this).attr('id');
437
             let id = $(this).attr('id');
436
             if ($(`#${id}:hover`).length > 0) {
438
             if ($(`#${id}:hover`).length > 0) {
437
-                return true;
439
+                hovered = true;
440
+                // break each
441
+                return false;
438
             }
442
             }
439
         });
443
         });
444
+        if (hovered)
445
+            return true;
440
         if ($("#bottomToolbar:hover").length > 0) {
446
         if ($("#bottomToolbar:hover").length > 0) {
441
             return true;
447
             return true;
442
         }
448
         }

Loading…
取消
儲存