diff --git a/CHANGES.md b/CHANGES.md index ea689ac63f..831c1b8a5f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,6 +24,7 @@ ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) ## 1.16.2-beta +- Fix strage cursor behaviour after clicking viewport with text pool [Github #2447](https://github.com/penpot/penpot/issues/2447) ## 1.16.1-beta diff --git a/common/src/app/common/geom/shapes/text.cljc b/common/src/app/common/geom/shapes/text.cljc index c32cf84c4d..1b6739187f 100644 --- a/common/src/app/common/geom/shapes/text.cljc +++ b/common/src/app/common/geom/shapes/text.cljc @@ -22,7 +22,9 @@ (let [points (->> shape :position-data (mapcat (comp gpr/rect->points position-data->rect)))] - (-> points (gpr/points->selrect)))) + (if (empty? points) + (:selrect shape) + (-> points (gpr/points->selrect))))) (defn position-data-bounding-box [shape]