Compare commits

...
This repository has been archived on 2025-05-21. You can view files and clone it, but cannot push or open issues or pull requests.

3 Commits
main ... main

Author SHA1 Message Date
Daniel Pantle
fc967884d5 refactor: move editor cancelling into function
All checks were successful
continuous-integration/drone/pr Build is passing
2024-10-01 16:14:57 +02:00
Daniel Pantle
360a72d639 Merge branch 'main' of ssh://kolaente.dev:9022/DanielPantle/vikunja
Some checks failed
continuous-integration/drone/pr Build is failing
2024-10-01 07:21:53 +02:00
Daniel Pantle
0938edc995 feat(frontend): cancel editing task title with escape 2024-10-01 07:03:51 +02:00

View File

@ -30,6 +30,7 @@
:spellcheck="false"
@blur="save(($event.target as HTMLInputElement).textContent as string)"
@keydown.enter.prevent.stop="($event.target as HTMLInputElement).blur()"
@keydown.esc.prevent.stop="cancel($event.target as HTMLInputElement)"
>
{{ task.title.trim() }}
</h1>
@ -133,6 +134,11 @@ async function save(title: string) {
saving.value = false
}
}
async function cancel(element: HTMLInputElement) {
element.textContent = props.task.title
element.blur()
}
</script>
<style lang="scss" scoped>