visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
290 stars 46 forks source link

Selection - Selection is not cleared after selecting a stretch of text #131

Closed adrian-moisa closed 9 months ago

adrian-moisa commented 2 years ago

For some reason after selecting some text, the second time when we attempt to select text again one of the anchors gets stuck on the previous position. This issue might be caused by the forking from Quill and the subsequent refactoring. I'd try to run the quill codebase, follow the callstack in that codebase and attempt to follow the same callstack in our codebase. There will be many differences in files setup but overall the code logic is the same. Somewhere we are not doing something right.

At the moment I can't consistently reproduce it. It seems it is working fine now. But it happened quite a lot recently. So as soon as I have indications on how to reproduce I'll update the ticket.

One way to always reproduce this behaviour is to attempt to grab a screen video in Mac after the cursor was placed. Without hitting Escape you will never be able to properly select text. One of the handles always remains stuck. This issue has been happening in all sorts of moments and often enough that is extremely annoying. Most users wont be able to deal with it. Must be fixed.

Could be related to the last pointer position. (not sure).

https://user-images.githubusercontent.com/11160141/200126231-d8baa4ca-9787-4574-bf35-ea84490c715c.mov

Join on discord to get advice and help or follow us on YouTube Visual Coding to learn more about the architecture of Visual Editor and other Flutter apps.