Removes click handlers when popup is hidden.

This commit is contained in:
damencho 2016-11-22 17:01:58 -06:00
parent 4d3ca4a85a
commit a079914603
1 changed files with 8 additions and 0 deletions

View File

@ -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);
};
/**