Skip to content

Fit text toggle disappears when toggled to 'off' #76691

@joedolson

Description

@joedolson

Description

When the fit text typography option is enabled, the toggle appears in the settings panel, as expected. When you turn it on, it behaves as expected. However, if you turn it off, the option disappears from the panel, causing a loss of focus.

This makes it difficult to experiment with the option - as if you turn it off, you need to navigate back to the typography panel to re-add the control, then navigate to the control to enable it.

It behaves differently from any other control in the Typography panel - none of the other controls are binary settings, and there is no "off" setting, just variants. I suspect this is an incidental result of handling of a false value in the setting that doesn't impact other controls.

Step-by-step reproduction instructions

  1. Add a paragraph or heading.
  2. Navigate to Typography settings.
  3. Add the 'Fit text' option.
  4. Turn on the fit text option.
  5. Turn off the fit text option.

The option is removed from the panel.

Screenshots, screen recording, code snippet

Recording.2026-03-19.125119.mp4

Environment info

  • 7.0-beta5-62067
  • Tested with and without Gutenberg 22.7.1

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

Assignees

No one assigned

    Labels

    [Block] Stretchy Text[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[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

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions