fix(client/fonts): grouping not working properly on iOS

This commit is contained in:
Elian Doran 2025-01-03 20:02:43 +02:00
parent a22afc4283
commit 8a494b220b
No known key found for this signature in database

View File

@ -212,15 +212,17 @@ export default class FontsOptions extends OptionsWidget {
$select.empty(); $select.empty();
for (const { title, items } of Object.values(FONT_FAMILIES)) { for (const { title, items } of Object.values(FONT_FAMILIES)) {
$select.append($("<optgroup>") const $group = ($("<optgroup>")
.attr("label", title)); .attr("label", title));
for (const {value, label} of items) { for (const {value, label} of items) {
$select.append($("<option>") $group.append($("<option>")
.attr("value", value) .attr("value", value)
.prop("selected", value === currentValue) .prop("selected", value === currentValue)
.text(label)); .text(label));
} }
$select.append($group);
} }
} }