Bug Report: Inconsistent Margin/Padding behavior when reverting custom Content in Pro 6.8.7

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_margin field 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.

1 Like

Hey @popoche,

It seems that this issue is connected to the other one you previously posted:

I already included this thread in our issue tracker as well.

Cheers.

Hello @ruenel

My previous report was about how the input to the calc() formula was being processed, which resulted in an infinite string and corrupted the page save.

This report, even though it concerns the same fields, indicates that they are not saved with the correct values (0px missing) when cleared using the back button (which affects all dynamic content, not just the calc formulas), resulting in incorrect margin/padding.

From what I can see as a user, these are two separate issues, even though they involve the same fields.

Thank you.

Hello @popoche,

We have already reported the issue in our issue tracker and shared your thread URL with our development team. Please stay tuned for the next theme update.

Thanks for understanding

Thank you @prakash_s

You are most welcome, @popoche

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.