Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Removes click handlers when popup is hidden.

damenchoa0799146032e
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js
index da84ede7e5..cecb5d08e8 100644
--- a/modules/UI/videolayout/RemoteVideo.js
+++ b/modules/UI/videolayout/RemoteVideo.js
@@ -105,6 +105,14 @@ RemoteVideo.prototype._initPopupMenu = function (popupMenuElement) {
// call the original show, passing its actual this
origShowFunc.call(this.popover);
}.bind(this);
+
+ // override popover hide method so we can cleanup click handlers
+ let origHideFunc = this.popover.forceHide;
+ this.popover.forceHide = function () {
+ $(document).off("click", '#mutelink_' + this.id);
+ $(document).off("click", '#ejectlink_' + this.id);
+ origHideFunc.call(this.popover);
+ }.bind(this);
};
/**