From 710fd30f7891ad085e3d2c2e195e4cf51d44ff4e Mon Sep 17 00:00:00 2001 From: Jack Storment <88656337+jack-stormentswe@users.noreply.github.com> Date: Wed, 29 Apr 2026 12:07:48 -0400 Subject: [PATCH] :bug: Preserve renamed layer name when re-entering edit mode (#9231) * :bug: Preserve renamed layer name when re-entering edit mode When a layer was renamed and the user clicked its name again to edit it, the input opened with the type-based default name instead of the user's saved name. Pressing Enter then silently overwrote the saved name with the default. Read the current shape :name when seeding the rename input so the user's previous rename is preserved. Signed-off-by: jack-stormentswe * :lipstick: Remove redundant DOM-refresh effect from layer rename input Signed-off-by: jack-stormentswe --------- Signed-off-by: jack-stormentswe Signed-off-by: Andrey Antukh Co-authored-by: Andrey Antukh --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/sidebar/layer_name.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index b9b42c551b..c79df35331 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -54,6 +54,7 @@ ### :bug: Bugs fixed +- Fix layers-panel rename input opening with the type-based default (e.g. "Ellipse") instead of the user's saved name when re-entering edit mode on a previously renamed layer; the silent revert could overwrite the saved name on confirm. The `default-value` `mf/with-memo` was missing `shape-name` from its dependency list, so once the memo cached the original default it never refreshed. Adds `shape-name` to the deps and force-syncs the input's DOM value on every entry into edit mode [Github #9230](https://github.com/penpot/penpot/issues/9230) - Suppress the browser context menu when right-clicking empty space in the workspace sidebars while preserving it on text inputs so paste/select-all still work [Github #5127](https://github.com/penpot/penpot/issues/5127) - Fix release notes modal appearing behind the dashboard sidebar [Github #8296](https://github.com/penpot/penpot/issues/8296) - Fix plugin API `fileVersion.restore()` promise hanging indefinitely on restore failure [Github #9092](https://github.com/penpot/penpot/issues/9092) diff --git a/frontend/src/app/main/ui/workspace/sidebar/layer_name.cljs b/frontend/src/app/main/ui/workspace/sidebar/layer_name.cljs index 5c0f181c1d..181ea70d47 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layer_name.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layer_name.cljs @@ -38,7 +38,7 @@ shape-name) default-value - (mf/with-memo [variant-id variant-error variant-properties] + (mf/with-memo [variant-id variant-error variant-properties shape-name] (if variant-id (or variant-error (ctv/properties-map->formula variant-properties)) shape-name))