From 14656a813c6f90dc4a7a1f4038f4b1d2068619f1 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Mon, 8 Sep 2025 22:23:20 +0200 Subject: [PATCH] improving mobile accesability Signed-off-by: Stephan Richter --- frontend/src/Components/MarkdownEditor.svelte | 17 +++++++++++------ web/src/main/resources/web/css/default.css | 10 ++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/frontend/src/Components/MarkdownEditor.svelte b/frontend/src/Components/MarkdownEditor.svelte index 591f9fa..8f347ef 100644 --- a/frontend/src/Components/MarkdownEditor.svelte +++ b/frontend/src/Components/MarkdownEditor.svelte @@ -26,6 +26,12 @@ } else resetEdit(); } + function doSave(){ + if (simple){ + onSet(editValue.source); + } else applyEdit(); + } + function resetEdit(){ editing = false; editValue = {source:value.source,rendered:value.rendered}; @@ -51,11 +57,7 @@ value.source = editValue.source; value.rendered = editValue.rendered; } - if (ev.keyCode == 13 && ev.ctrlKey){ - if (simple){ - onSet(editValue.source); - } else applyEdit(); - } + if (ev.keyCode == 13 && ev.ctrlKey) doSave(); if (ev.keyCode == 27) resetEdit(); if (timer) clearTimeout(timer); @@ -117,7 +119,10 @@
{#if editing} - +
+ + +
{/if} {@html target(editValue.rendered)}
\ No newline at end of file diff --git a/web/src/main/resources/web/css/default.css b/web/src/main/resources/web/css/default.css index f7a8ed9..ee8dac1 100644 --- a/web/src/main/resources/web/css/default.css +++ b/web/src/main/resources/web/css/default.css @@ -359,4 +359,14 @@ table{ border: 0 none; background: none; color: orange; +} + +.boundary{ + position: relative; +} + +.boundary button.save{ + position: absolute; + right: 0; + bottom: 0; } \ No newline at end of file