1
0
mirror of https://github.com/pierre42100/ComunicWeb synced 2025-07-13 06:28:08 +00:00

Make emoji picker close automatically if input parent element is destroyed

This commit is contained in:
Pierre
2018-04-20 16:52:17 +02:00
parent b05a26d734
commit 3cee773de0
2 changed files with 35 additions and 1 deletions
assets
3rdparty
js
common

@ -445,4 +445,24 @@ window.location.changed = function(e){};
window.location.changed(window.location);
}
}, 900);
})();
})();
/**
* jQuery special event that detects the deletion
* of a DOM element
*
* @source StackOverFlow answer from mtkopone
*/
(function($){
$.event.special.destroyed = {
remove: function(o){
if(o.handler)
o.handler();
}
}
})(jQuery);