diff --git a/CHANGES.md b/CHANGES.md index 909f62349a..5b67cb8b60 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -40,6 +40,9 @@ - Fix font rendering on grid thumbnails [Taiga #3473](https://tree.taiga.io/project/penpot/issue/3473) - Fix Drag and drop font assets in groups [Taiga #3763](https://tree.taiga.io/project/penpot/issue/3763) - Fix copy and paste layers order [Taiga #1617](https://tree.taiga.io/project/penpot/issue/1617) +- Fix unexpected removal of guides on copy&paste frames [Taiga #3887](https://tree.taiga.io/project/penpot/issue/3887) by @andrewzhurov +- Fix props preserving on copy&paste texts [Taiga #3629](https://tree.taiga.io/project/penpot/issue/3629) by @andrewzhurov + ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index 777a5d49c8..dbc2a68ba8 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -425,11 +425,9 @@ (assoc :position (if (= (:axis %) :x) (+ (:position %) (- (:x new-frame) (:x frame))) (+ (:position %) (- (:y new-frame) (:y frame))))))))] - - (if-not (empty? new-guides) - (conj g - (into {} (map (juxt :id identity) new-guides))) - {}))) + (cond-> g + (not-empty new-guides) + (conj (into {} (map (juxt :id identity) new-guides)))))) guides frames)] (-> (pcb/with-page changes page) diff --git a/frontend/src/app/util/text_editor_impl.js b/frontend/src/app/util/text_editor_impl.js index 6a8cbc1787..c032a90fe9 100644 --- a/frontend/src/app/util/text_editor_impl.js +++ b/frontend/src/app/util/text_editor_impl.js @@ -378,10 +378,7 @@ export function insertText(state, text, attrs, inlineStyles) { ); blockArray = blockArray.map((b) => { - if (b.getText() === "") { - return mergeBlockData(b, attrs) - } - return b; + return mergeBlockData(b, attrs); }); const fragment = BlockMapBuilder.createFromArray(blockArray);