diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs index 7b1b258a2c..7d08ed806c 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/measures.cljs @@ -50,10 +50,11 @@ :show-content :hide-in-viewer - ;; Needed to disable/enable width/height + ;; Needed to disable/enable width/height and x/y ;; otherwise the memo will not detect changes :layout-item-h-sizing - :layout-item-v-sizing]) + :layout-item-v-sizing + :layout-item-absolute]) (def ^:private generic-options #{:size :position :rotation}) @@ -161,6 +162,8 @@ (get n-values :layout-item-h-sizing)) (identical? (get o-values :layout-item-v-sizing) (get n-values :layout-item-v-sizing)) + (identical? (get o-values :layout-item-absolute) + (get n-values :layout-item-absolute)) (identical? (get o-values :points) (get n-values :points)) (identical? (get o-values :selrect) diff --git a/frontend/test/frontend_tests/ui/measures_menu_props_test.cljs b/frontend/test/frontend_tests/ui/measures_menu_props_test.cljs index e4a7b81903..0f509d3a08 100644 --- a/frontend/test/frontend_tests/ui/measures_menu_props_test.cljs +++ b/frontend/test/frontend_tests/ui/measures_menu_props_test.cljs @@ -48,4 +48,11 @@ (t/testing "re-renders when width changes" (t/is (false? (check-measures-menu-props (props base-values) - (props (assoc base-values :width 150))))))) + (props (assoc base-values :width 150)))))) + + (t/testing "re-renders when absolute positioning changes but nothing else does" + ;; Regression test: toggling static <-> absolute on a flex child must + ;; force a re-render so the X/Y inputs enabled/disabled state updates. + (t/is (false? (check-measures-menu-props + (props (assoc base-values :layout-item-absolute false)) + (props (assoc base-values :layout-item-absolute true)))))))