Open uyu423 opened 3 months ago
Unsure where this is originated.
Could this be an issue with text segmentation? If so Intl.Segmenter might help. Aka use Intl.Segmenter
instead of split(' ')
.
I was unable to reproduce this when copying the Korean text from the original comment into the task input and pressing enter. This may indicate the bug has something to do with the keyboard layout, not necessarily with Korean letters.
@dpschen maybe we should add that and check if the issue is gone after that?
I was able to reproduce. It did work in the overview. But in a project list view you will end up with two tasks.
Thank you for your passionate technical support.
The way to reproduce @kolaente 's issue is probably because the copied text is in a different cursor activation state. I guess the issue is reproduced only when directly inputting.
@dpschen In my case, it is reproduced in both the overview and project list views.
Is there anything you can check to help me with this issue? If you tell me where to set the debug point and create the task, I can check it ! (although my knowledge of the frontend is limited)
My best guess right now is this has something to do with the multiline input (you can enter multiple lines of text and it will create a task for each line). If that's the case, using Intl.Segmenter as suggested by dpschen should fix it. I'll take a look.
Here's where we split:
It looks like that should work since \r\n
is the same regardless of the input text language.
AFAIK to properly use Intl.Segmenter
we'd need to detect the language of the input, which isn't really possible that easily (and overkill for the problem at hand).
@dpschen do you have an idea how to debug this further?
Maybe try out the following: assume the written text is in the users language (even if that’s not the case). For segmentation the result might still be better than splitting by space. Eg. afaik emojis shouldn’t make problems.
If it doesn’t solve the problem I would reverse it.
Description
Hello. I am a user from South Korea.
When creating a task using Korean input and hitting enter, the task gets created multiple times. This issue might also occur with other input methods similar to Korean, such as Chinese and Japanese. However, moving the cursor more than once or using the "ADD" button to create the task does not result in this issue. Testing in Safari browser showed normal behavior without any issues. I am attaching a screenshot for reference.
ps) When a task is duplicated, one is created exactly as entered, and the other is created with the last character omitted.
Thank you.
Test:
Input Korean Text (title: "한글이 두번 입력되는 이슈 테스트")
Duplicate creation HTTP request
Result
Vikunja Version
v0.24.1
Browser and version
Google Chrome 127.0.6533.73 (arm64)
Can you reproduce the bug on the Vikunja demo site?
Yes
Screenshots
No response