Pārlūkot izejas kodu

Removes click handlers when popup is hidden.

master
damencho 8 gadus atpakaļ
vecāks
revīzija
a079914603
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8
    0
      modules/UI/videolayout/RemoteVideo.js

+ 8
- 0
modules/UI/videolayout/RemoteVideo.js Parādīt failu

@@ -105,6 +105,14 @@ RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) {
105 105
         // call the original show, passing its actual this
106 106
         origShowFunc.call(this.popover);
107 107
     }.bind(this);
108
+
109
+    // override popover hide method so we can cleanup click handlers
110
+    let origHideFunc = this.popover.forceHide;
111
+    this.popover.forceHide = function () {
112
+        $(document).off("click", '#mutelink_' + this.id);
113
+        $(document).off("click", '#ejectlink_' + this.id);
114
+        origHideFunc.call(this.popover);
115
+    }.bind(this);
108 116
 };
109 117
 
110 118
 /**

Notiek ielāde…
Atcelt
Saglabāt