Description:
Using the “back” button (or clearing the content) on a margin or padding field that contains custom content (such as dynamic content or formula) saves an empty value instead of “0px”. This causes the field to behave inconsistently for all subsequent actions.
Reproduction Steps
[Preparation]
-
Create a page with a section, a row, and a column.
-
Create a Headline element within the column.
-
Open the dev toolkit inspector and search for the “margin” property.
[How to trigger the bug]
-
Select the Headline and activate the margin.
-
By default, all sides are linked and display “0em”.
-
Confirm the
text_marginfield in the dev toolkit inspector shows “0em”. -
Enter custom content (such as dynamic content, i.e. “{{dc:param:margin}}” or a formula, i.e. “calc(5px * 2)”) into any field, as long as it causes the “Back arrow” button to appear.
-
Confirm the `text_margin" field in the dev toolkit inspector now shows what you typed, i.e. “{{dc:param:margin}}” or “calc(5px * 2)”.
-
Clear the content of any side field, either by clicking the “back arrow” button or by selecting the text with the mouse and pressing the Delete key on the keyboard.
-
(This is the bug:) Note that the “text_margin” field in the dev toolkit inspector is now empty, whereas it should contain “0px”.
[How to verify the inconsistency]
-
Unlink the sides.
-
Type “150px” for the bottom value.
-
Note that the “text_margin” field in the dev toolkit inspector incorrectly shows " 150px" (with leading spaces) instead of the expected “0px 0px 150px 0px”.
-
Additionally, note that the Headline in the preview pane applies a 150px margin to all sides rather than just the bottom.
