mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Remove style attribute after remove float property if not styling left
This commit is contained in:
parent
9b7ea75399
commit
9001b597da
1 changed files with 6 additions and 1 deletions
|
@ -41,7 +41,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
active={image.style.float === "" || image.style.float === "none"}
|
||||
flipX={isRtl}
|
||||
on:click={() => {
|
||||
image.style.float = "";
|
||||
image.style.removeProperty("float");
|
||||
|
||||
if (image.getAttribute("style")?.length === 0) {
|
||||
image.removeAttribute("style");
|
||||
}
|
||||
|
||||
setTimeout(() => dispatch("update"));
|
||||
}}>{@html floatNoneIcon}</IconButton
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue