kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix problem with pop listview animation
It turns out the transitionEnd event fires separately for each animated property. We'll just remove ourselves on the first oneprint-window-tiddler
rodzic
280d4dc181
commit
6d3f224817
core/modules/widgets/list/listviews
|
@ -48,10 +48,12 @@ PopListView.prototype.remove = function(index) {
|
|||
var listElementNode = this.listWidget.children[index],
|
||||
targetElement = listElementNode.domNode;
|
||||
// Attach an event handler for the end of the transition
|
||||
targetElement.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
|
||||
var transitionEventName = $tw.utils.convertEventName("transitionEnd");
|
||||
targetElement.addEventListener(transitionEventName,function handler(event) {
|
||||
if(targetElement.parentNode) {
|
||||
targetElement.parentNode.removeChild(targetElement);
|
||||
}
|
||||
targetElement.removeEventListener(transitionEventName,handler,false);
|
||||
},false);
|
||||
// Animate the closure
|
||||
$tw.utils.setStyle(targetElement,[
|
||||
|
|
Ładowanie…
Reference in New Issue