mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-07 06:20:46 -08:00
fix: zoomin storyview should not remove CSS properties when element is already removed (#9686)
This commit is contained in:
parent
75c26b46c6
commit
49faefcca5
2 changed files with 5 additions and 3 deletions
|
|
@ -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]));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue