1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-28 15:08:46 +00:00

Fix notification removal to not rely on transitionEnd events

This commit is contained in:
Jermolene 2014-01-09 22:26:21 +00:00
parent 2740f8c1f0
commit b64b7982af

View File

@ -67,13 +67,12 @@ Notifier.prototype.display = function(title,options) {
{opacity: "0.0"},
{transform: "translateX(" + (notification.offsetWidth) + "px)"}
]);
// Set up an event for the transition end
notification.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
// Remove the modal message from the DOM once the transition ends
setTimeout(function() {
if(notification.parentNode) {
// Remove the modal message from the DOM
document.body.removeChild(notification);
}
},false);
},duration);
},$tw.config.preferences.notificationDuration);
};