elementor/elementor

Group_Control_Typography doesn't generate default CSS like Group_Control_Border

Closed this issue · 0 comments

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