mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 01:02:05 +00:00
Tooltips are now properly hidden if the element is removed from the dom.
This commit is contained in:
parent
0789ace879
commit
5c1d683e71
1 changed files with 18 additions and 0 deletions
|
@ -19,6 +19,24 @@ Tooltip.prototype.getOptions = function(options) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var onElementRemoved = function(event) {
|
||||||
|
event.data.hide();
|
||||||
|
};
|
||||||
|
|
||||||
|
var origShow = Tooltip.prototype.show;
|
||||||
|
Tooltip.prototype.show = function() {
|
||||||
|
origShow.call(this);
|
||||||
|
|
||||||
|
this.$element.on('remove', this, onElementRemoved);
|
||||||
|
};
|
||||||
|
|
||||||
|
var origHide = Tooltip.prototype.hide;
|
||||||
|
Tooltip.prototype.hide = function() {
|
||||||
|
origHide.call(this);
|
||||||
|
|
||||||
|
this.$element.off('remove', onElementRemoved);
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
appInitializer : function() {
|
appInitializer : function() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue