Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(client): inject icon pack CSS via textContent instead of innerText
Elian Doran8ab5933c95c4
diff --git a/apps/client/src/index.ts b/apps/client/src/index.tsindex 7c2c247f27..a39765f4a8 100644--- a/apps/client/src/index.ts+++ b/apps/client/src/index.ts@@ -105,7 +105,10 @@ function appendStylesheet(ref: StylesheetRef, opts?: { base?: boolean; theme?: bfunction loadIcons() {const styleEl = document.createElement("style");- styleEl.innerText = window.glob.iconPackCss;+ // Must be textContent, not innerText: the innerText setter turns every newline into a real+ // <br> element (one per CSS line, ~20k with several icon packs). iOS WebKit's focused-element+ // scan walks all of them on every keyboard focus, freezing the app for seconds.+ styleEl.textContent = window.glob.iconPackCss;document.head.appendChild(styleEl);}