diff --git a/CHANGES.md b/CHANGES.md index 5b74fe0c8..022c4eb8e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -57,6 +57,7 @@ - Fix problem when copy/pasting shapes [Taiga #4931](https://tree.taiga.io/project/penpot/issue/4931) - Fix problem with color picker not able to change hue [Taiga #5065](https://tree.taiga.io/project/penpot/issue/5065) - Fix problem with outer stroke in texts [Taiga #5078](https://tree.taiga.io/project/penpot/issue/5078) +- Fix problem with text carring over next line when changing to fixed [Taiga #5067](https://tree.taiga.io/project/penpot/issue/5067) ### :heart: Community contributions by (Thank you!) - To @ondrejkonec: for contributing to the code with: diff --git a/frontend/src/app/main/data/workspace/texts.cljs b/frontend/src/app/main/data/workspace/texts.cljs index 53343202a..4475f95a0 100644 --- a/frontend/src/app/main/data/workspace/texts.cljs +++ b/frontend/src/app/main/data/workspace/texts.cljs @@ -377,7 +377,7 @@ (assoc-in [:workspace-local :edition] (-> selected first :id))))))) (defn not-changed? [old-dim new-dim] - (> (mth/abs (- old-dim new-dim)) 1)) + (> (mth/abs (- old-dim new-dim)) 0.1)) (defn commit-resize-text [] diff --git a/frontend/src/app/main/ui/workspace/shapes/text/viewport_texts_html.cljs b/frontend/src/app/main/ui/workspace/shapes/text/viewport_texts_html.cljs index 14ef7aace..a6633ccd7 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/viewport_texts_html.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/viewport_texts_html.cljs @@ -66,7 +66,8 @@ (when (contains? #{:auto-height :auto-width} grow-type) (let [{:keys [width height]} (-> (dom/query node ".paragraph-set") - (dom/get-client-size)) + (dom/get-bounding-rect)) + width (mth/ceil width) height (mth/ceil height)] (when (and (not (mth/almost-zero? width))