diff --git a/src/main.ts b/src/main.ts index 6a46eb4..058d5e2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -584,9 +584,11 @@ async function revealWindow(): Promise { window.addEventListener("DOMContentLoaded", () => { applyTheme(currentThemeId, currentMode); refreshToolbar = createToolbar(toolbarEl, () => editor); - void boot().then(() => { - requestAnimationFrame(() => void revealWindow().catch(() => {})); - }); + void boot() + .catch((err) => console.error("boot failed", err)) + .then(() => { + requestAnimationFrame(() => void revealWindow().catch(() => {})); + }); }); window.addEventListener("beforeunload", () => { diff --git a/src/styles.css b/src/styles.css index 2d1cdb1..736f87c 100644 --- a/src/styles.css +++ b/src/styles.css @@ -323,10 +323,53 @@ box-sizing: border-box; } +*, +*::before, +*::after { + user-select: none; + -webkit-user-select: none; + -webkit-user-drag: none; +} + +input, +textarea, +[contenteditable="true"], +[contenteditable="true"] *, +.entry-editor *, +#as-datadir { + user-select: text; + -webkit-user-select: text; + -webkit-user-drag: auto; +} + +img { + -webkit-user-drag: none; +} + html, body { margin: 0; height: 100%; + overflow: hidden; + overscroll-behavior: none; +} + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-track { + background: transparent; +} + +::-webkit-scrollbar-thumb { + background: rgba(128, 128, 128, 0.25); + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(128, 128, 128, 0.45); } body {