From fb5521eeedffe55a433cec8fb8a5e1389f9eab70 Mon Sep 17 00:00:00 2001 From: BlueGreenMagick Date: Wed, 11 May 2022 09:06:34 +0900 Subject: [PATCH] remove image.style.height on resize (#1856) --- ts/editor/image-overlay/ImageHandle.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ts/editor/image-overlay/ImageHandle.svelte b/ts/editor/image-overlay/ImageHandle.svelte index 3021e222e..f1f9e819a 100644 --- a/ts/editor/image-overlay/ImageHandle.svelte +++ b/ts/editor/image-overlay/ImageHandle.svelte @@ -152,12 +152,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } /** - * Image resizing add-ons previously used image.style.width to set the - * preferred width of an image. In these cases, if we'd only set - * image.width, there would be no visible effect on the image. - * To avoid confusion with users we'll clear image.style.width (for now). + * Image resizing add-ons previously used image.style.width/height to set the + * preferred dimension of an image. In these cases, if we'd only set + * image.[dimension], there would be no visible effect on the image. + * To avoid confusion with users we'll clear image.style.[dimension] (for now). */ activeImage!.style.removeProperty("width"); + activeImage!.style.removeProperty("height"); if (activeImage!.getAttribute("style")?.length === 0) { activeImage!.removeAttribute("style"); }