mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-05-28 08:12:19 +00:00
fix: zoomin storyview should not remove CSS properties when element is already removed (#9686)
This commit is contained in:
@@ -212,8 +212,8 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
]);
|
||||
setTimeout(function() {
|
||||
$tw.utils.removeStyles(toWidgetDomNode, ["transformOrigin", "transform", "transition", "opacity", "zIndex"]);
|
||||
removeElement();
|
||||
}, duration);
|
||||
setTimeout(removeElement,duration);
|
||||
// Now the tiddler we're going back to
|
||||
if(toWidgetDomNode) {
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
|
||||
@@ -30,8 +30,10 @@ Remove style properties of an element
|
||||
styleProperties: ordered array of string property names
|
||||
*/
|
||||
exports.removeStyles = function(element, styleProperties) {
|
||||
for(var i=0; i<styleProperties.length; i++) {
|
||||
element.style.removeProperty($tw.utils.convertStyleNameToPropertyName(styleProperties[i]));
|
||||
if(element) {
|
||||
for(var i=0; i<styleProperties.length; i++) {
|
||||
element.style.removeProperty($tw.utils.convertStyleNameToPropertyName(styleProperties[i]));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user