diff --git a/CHANGES.md b/CHANGES.md index dc2012fff..ea689ac63 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ - Fix twitter support account link [Taiga #4279](https://tree.taiga.io/project/penpot/issue/4279) - Fix lang autodetect issue [Taiga #4277](https://tree.taiga.io/project/penpot/issue/4277) - Fix adding an extra page on import [Taiga #4543](https://tree.taiga.io/project/penpot/task/4543) +- Fix unable to select text at assets inputs in firefox [Taiga #4572](https://tree.taiga.io/project/penpot/issue/4572) ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs index 9746e0438..2f5434f33 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets.cljs @@ -1286,7 +1286,7 @@ #(on-asset-click % (:id color) (partial apply-color (:id color)))) :ref item-ref - :draggable (not workspace-read-only?) + :draggable (and (not workspace-read-only?) (not (:editing @state))) :on-drag-start on-color-drag-start :on-drag-enter on-drag-enter :on-drag-leave on-drag-leave @@ -1557,6 +1557,8 @@ (let [item-ref (mf/use-ref) dragging? (mf/use-state false) workspace-read-only? (mf/use-ctx ctx/workspace-read-only?) + editing? (= editing-id (:id typography)) + open? (mf/use-state editing?) on-drop (mf/use-fn (mf/deps typography dragging? selected-typographies selected-typographies-full selected-typographies-paths move-typography) @@ -1587,7 +1589,7 @@ (on-asset-drag-start event typography selected-typographies item-ref :typographies identity))))] [:div.typography-container {:ref item-ref - :draggable (not workspace-read-only?) + :draggable (and (not workspace-read-only?) (not @open?)) :on-drag-start on-typography-drag-start :on-drag-enter on-drag-enter :on-drag-leave on-drag-leave @@ -1603,8 +1605,9 @@ :selected? (contains? selected-typographies (:id typography)) :on-click #(on-asset-click % (:id typography) (partial apply-typography typography)) - :editing? (= editing-id (:id typography)) - :focus-name? (= (:rename-typography local-data) (:id typography))}] + :editing? editing? + :focus-name? (= (:rename-typography local-data) (:id typography)) + :open? open?}] (when @dragging? [:div.dragging])])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index 62c77cb0d..a6fae4c3b 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -456,9 +456,8 @@ ;; In summary, this need to a good UX/UI/IMPL rework. (mf/defc typography-entry - [{:keys [typography local? selected? on-click on-change on-detach on-context-menu editing? focus-name? file]}] - (let [open? (mf/use-state editing?) - hover-detach (mf/use-state false) + [{:keys [typography local? selected? on-click on-change on-detach on-context-menu editing? focus-name? file open?]}] + (let [hover-detach (mf/use-state false) name-input-ref (mf/use-ref) on-change-ref (mf/use-ref nil) workspace-read-only? (mf/use-ctx ctx/workspace-read-only?)