mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-04-01 08:16:55 +00:00
Fix notification removal to not rely on transitionEnd events
This commit is contained in:
parent
2740f8c1f0
commit
b64b7982af
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user