mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-08 06:43:49 +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"},
|
{opacity: "0.0"},
|
||||||
{transform: "translateX(" + (notification.offsetWidth) + "px)"}
|
{transform: "translateX(" + (notification.offsetWidth) + "px)"}
|
||||||
]);
|
]);
|
||||||
// Set up an event for the transition end
|
// Remove the modal message from the DOM once the transition ends
|
||||||
notification.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
|
setTimeout(function() {
|
||||||
if(notification.parentNode) {
|
if(notification.parentNode) {
|
||||||
// Remove the modal message from the DOM
|
|
||||||
document.body.removeChild(notification);
|
document.body.removeChild(notification);
|
||||||
}
|
}
|
||||||
},false);
|
},duration);
|
||||||
},$tw.config.preferences.notificationDuration);
|
},$tw.config.preferences.notificationDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user