Make elements not selectable by default

This commit is contained in:
Joscha 2025-02-15 12:42:42 +01:00
parent d3a18893de
commit 5a244e585f
6 changed files with 8 additions and 6 deletions

View file

@ -14,7 +14,6 @@ variations or spellings are incorrect.
## Todos
- TODO Fix wide notes adding horizontal scroll bar
- TODO Make text not selectable by default
- TODO Fix deleting note not unlinking it (and maybe other child inconsistencies
as well)
- TODO Rename "note not found" to "loading..."

View file

@ -23,7 +23,7 @@ window.addEventListener("keypress", (ev) => {
</script>
<template>
<div class="flex h-screen touch-pan-x touch-pan-y flex-col">
<div class="flex h-screen touch-pan-x touch-pan-y select-none flex-col">
<CNavbar />
<div class="h-full overflow-auto p-1 pr-5">
<CNote

View file

@ -1,6 +1,6 @@
<template>
<div
class="flex select-none items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
class="flex items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
>
<slot></slot>
</div>

View file

@ -1,6 +1,6 @@
<template>
<div class="m-1">
<div class="cursor-pointer select-none rounded px-2 hover:bg-neutral-700">
<div class="cursor-pointer rounded px-2 hover:bg-neutral-700">
<slot></slot>
</div>
</div>

View file

@ -217,7 +217,10 @@ async function onInsertEditorCopy(): Promise<void> {
@close="onEditEditorClose"
@finish="onEditEditorFinish"
/>
<div v-else-if="note && note.text.trim().length > 0" class="whitespace-pre-wrap px-1">
<div
v-else-if="note && note.text.trim().length > 0"
class="select-auto whitespace-pre-wrap px-1"
>
{{ note.text }}
</div>
<div v-else-if="note" class="px-1 font-light italic">empty</div>

View file

@ -12,7 +12,7 @@ const {
<template>
<button
class="flex h-5 w-5 select-none items-center justify-center rounded-sm border border-black transition"
class="flex h-5 w-5 items-center justify-center rounded-sm border border-black transition"
:class="{
'bg-white text-black': !inverted,
'bg-black text-white': inverted,