Skip to content

Build your personal knowledge base with Trilium Notes

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

Elian Doran8a494b220b28
diff --git a/src/public/app/widgets/type_widgets/options/appearance/fonts.ts b/src/public/app/widgets/type_widgets/options/appearance/fonts.ts
index 824162e1af..a5658c4b17 100644
--- a/src/public/app/widgets/type_widgets/options/appearance/fonts.ts
+++ b/src/public/app/widgets/type_widgets/options/appearance/fonts.ts
@@ -212,15 +212,17 @@ export default class FontsOptions extends OptionsWidget {
$select.empty();
for (const { title, items } of Object.values(FONT_FAMILIES)) {
- $select.append($("<optgroup>")
+ const $group = ($("<optgroup>")
.attr("label", title));
for (const {value, label} of items) {
- $select.append($("<option>")
+ $group.append($("<option>")
.attr("value", value)
.prop("selected", value === currentValue)
.text(label));
}
+
+ $select.append($group);
}
}