Skip to content

Fit text toggle does not recalculate width when paragraph is grouped #72963

@saarnilauri

Description

@saarnilauri

Description

When a paragraph block has the "Fit text" toggle enabled, the text correctly fits to the width of the content area. However, if the paragraph is subsequently grouped and the group's content width is modified (e.g., set to 50%), the paragraph text does not automatically recalculate its width to fit the new container dimensions.

Expected Behavior
The paragraph text should automatically recalculate and fit to the new container width (50% of the group) when the parent container dimensions change.

Actual Behavior
The paragraph text retains its original width and does not adjust to the new container dimensions. The "Fit text" toggle must be manually toggled off and on again to force a recalculation and apply the correct width.

Workaround
Toggle the "Fit text" setting off and then on again to force the text to recalculate its width based on the new container dimensions.

Step-by-step reproduction instructions

  1. Insert a paragraph block into the editor
  2. Enable the "Fit text" toggle for the paragraph
  3. Verify that the text fits the content area width correctly
  4. Select the paragraph and group it (using the Group block)
  5. Set the group's content width to 50%
  6. Observe the paragraph text width

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.9-beta2 on https://playground.wordpress.net/ running Twenty Twenty-Five theme.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Labels

[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions