From 80f41c4a692133b08942288f5b661b7e168e6002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?andr=C3=A9s=20gonz=C3=A1lez?= Date: Thu, 7 Aug 2025 07:42:33 +0200 Subject: [PATCH] :bug: Fix issue where Alt + arrow keys shortcut interferes with letter-spacing (#7071) --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/text/shortcuts.cljs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 63c3a6f0c6..771633422e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,7 @@ - Fix missing package for the `penpot_exporter` Docker image [GitHub #7205](https://github.com/penpot/penpot/issues/7025) - Fix issue where multiple dropdown menus could be opened simultaneously on the dashboard page [Taiga #11500](https://tree.taiga.io/project/penpot/issue/11500) - Fix font size/variant not updated when editing a text [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11552) +- Fix issue where Alt + arrow keys shortcut interferes with letter-spacing when moving text layers [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11771) ## 2.9.0 (Unreleased) diff --git a/frontend/src/app/main/data/workspace/text/shortcuts.cljs b/frontend/src/app/main/data/workspace/text/shortcuts.cljs index e245adad49..1f9acbf719 100644 --- a/frontend/src/app/main/data/workspace/text/shortcuts.cljs +++ b/frontend/src/app/main/data/workspace/text/shortcuts.cljs @@ -205,11 +205,14 @@ (filter cfh/text-shape?) (not-empty)) + ;; Check if we're actually editing text content (not just selecting text shapes) + editing-text? (some? (deref refs/workspace-editor)) + props (if (> (count text-shapes) 1) (blend-props text-shapes props) props)] - (when (and can-edit? (not read-only?) text-shapes) + (when (and can-edit? (not read-only?) text-shapes editing-text?) (st/emit! (dwu/start-undo-transaction undo-id)) (run! #(update-attrs % props) text-shapes) (st/emit! (dwu/commit-undo-transaction undo-id)))))