vikunja/frontend/src/components
DanielPantle faff1040dc feat(task): cancel editing task title with escape (#2730)
With this change, it is possible to cancel editing the task title with pressing the escape key.

# Problem

Before it was not possible to cancel editing the task title. Pressing outside the title saves the changes that have already been done (which is intended I think). But when e.g. pasting something with a wrong format, I was not able to revert the change without saving and editing it again

Example: after accidentially pasting something with multiple lines it is not possible to escape, the only way to revert this is to save and edit again manually:
![grafik.png](/attachments/11d3559a-3111-458f-9a9c-4107292054fa)

# Solution

This PR implements a listener for the escape key that sets the title back to its original value and blurs the focus of the title

# Additional notes

- I checked this in the "page" view of the task and the "popup" view and it worked in both. For me, the popup does not close with the escape key (as it often does on other sites), therefore there is no collision with this function. But I think it would be good to check this again to make sure it does not break anything like this
- I don't know anything about testing in this repository, if it is possible/necessary to implement a test for this feature please leave a comment :)

Co-authored-by: Daniel Pantle <daniel.pantle@newtec.de>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2730
Co-authored-by: DanielPantle <danielpantle@noreply.kolaente.dev>
Co-committed-by: DanielPantle <danielpantle@noreply.kolaente.dev>
2024-10-02 07:32:33 +00:00
..
base fix(task): paginate task comments 2024-09-29 13:28:29 +02:00
date fix: emit for DatepickerWithValues 2024-07-19 05:28:17 +00:00
home feat: add utm tag to powered by link 2024-09-23 12:07:06 +02:00
input fix(checkbox): use sibling css selector instead of has 2024-09-25 14:38:17 +02:00
misc fix(task): improve task delete modal on mobile 2024-09-29 13:47:35 +02:00
notifications feat: do not load notifications while in the background 2024-09-23 10:31:09 +02:00
project fix(filters): clarify usage of reminders in filters 2024-09-29 21:11:08 +02:00
quick-actions feat: camelcase global components 2024-06-19 14:02:14 +00:00
sharing feat: use withDefaults for UserTeam 2024-07-16 21:37:28 +00:00
tasks feat(task): cancel editing task title with escape (#2730) 2024-10-02 07:32:33 +00:00