From da4c2c018ce43bc0d321f6d98820c93bafe3e0f4 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Tue, 8 Sep 2020 23:47:24 +0300 Subject: [PATCH] v1.4.44 --- modules/save-and-load.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 0ef3ad0c..6ad47701 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -154,6 +154,15 @@ function inlineStyle(clone) { style += key + ':' + value + ';'; } + for (const key in compStyle) { + const value = compStyle.getPropertyValue(key); + + if (key === "cursor") continue; // cursor should be default + if (this.hasAttribute(key)) continue; // don't add style if there is the same attribute + if (value === defaultStyles.getPropertyValue(key)) continue; + style += key + ':' + value + ';'; + } + if (style != "") this.setAttribute('style', style); });