Skip to content

Group_Control_Typography doesn't generate default CSS like Group_Control_Border #6500

@tristanleboss

Description

@tristanleboss

We created a widget with 2 groups of controls:
Group_Control_Typography / CSS like Group_Control_Border

We want the UI to have default settings pre-selected and we want these settings to be applied automaticaly. So we discovered the fields_options key.

It works perfectly for the Group_Control_Border: when we add a new widget, the first render of the widget and the UI reflects the default settigns.

But it doesn't work for the Group_Control_Typography. Indeed, the UI does reflect the default values but the first render of the widget doesn't. To apply the settings, we just have to open the Typography popup: just clicking the "pen" icon is enough to produce a refresh the widget and generate the missing CSS.

I don't understand why these 2 groups of controls behave differently. Group_Control_Typography seems to be malfunctionning as you would expect default values to be applied... if they are not, setting default values is useless.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates a bug with one or multiple components.status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions