Pārlūkot izejas kodu

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

Fixes the check whether we are hovering over the toolbar.
master
yanas 9 gadus atpakaļ
vecāks
revīzija
7c89f2b7d1
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8
    2
      modules/UI/toolbars/Toolbar.js

+ 8
- 2
modules/UI/toolbars/Toolbar.js Parādīt failu

@@ -428,15 +428,21 @@ const Toolbar = {
428 428
 
429 429
     /**
430 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 434
     isHovered() {
435
+        var hovered = false;
434 436
         this.toolbarSelector.find('*').each(function () {
435 437
             let id = $(this).attr('id');
436 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 446
         if ($("#bottomToolbar:hover").length > 0) {
441 447
             return true;
442 448
         }

Notiek ielāde…
Atcelt
Saglabāt