singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 840 forks source link

Cursor is not updating base on the size of the text. #2169

Open honzaadamec opened 2 months ago

honzaadamec commented 2 months ago

Is there an existing issue for this?

Flutter Quill version

flutter_quill: ^10.1.5

Steps to reproduce

Screenshot at Aug 31 15-35-35

I tried on different platforms as linux, windows or web for example. Same result.

The same problem is on your git repo, where you have already some example for try. Same bug/issue there.

image

I tried to somehow make it on different way. I have found that here is some option of TextStyle. But it only work for paragraph. But it affected the height of the text overall.. so this is not good solution. When I need have line spacing same on different lines. image

The other variation for example header. It totally ignore the fontsize. And set cursor with some default height.

Expected results

Expected result is to set cursor height base on font size in attributes of the controller.

Actual results

Cursor size not updating. Or there is not easy way to handle it.

Code sample

No response

Additional Context

Related #1568

ifuterman commented 2 months ago

The same. I found CursorStyle class. But this is the parameter for a QuillRawEditor.

Paul-creator commented 2 months ago

I ran the example project of the repo an look at the results:

I opened Default:

Screenshot 2024-09-03 at 21 04 03

The cursor has the right size in the existing text:

Screenshot 2024-09-03 at 21 04 17 Screenshot 2024-09-03 at 21 04 28

However if i write some text and adjust the size I have the same problem as you:

Screenshot 2024-09-03 at 21 07 36

Also further down in the example, where the font changes in the line, the cursor size is wrong again:

Screenshot 2024-09-03 at 21 04 51
EchoEllet commented 2 months ago

1688 seems to be a PR that fixes the issue that occurs on the web in the case of iOS.

Do you mean the issue itself (#1568)?

Paul-creator commented 2 months ago

He means the issue itself for sure. Here is a little video which shows the issue in the repo using the example project. Video on Google Drive

CatHood0 commented 2 months ago

I'll try to fix this when i have time. I need to fix some issues that are my priority and then i will fix this.

ifuterman commented 2 months ago

Fastest fix, add a property with cursor style to the QuillEditor.

CatHood0 commented 2 months ago

Fastest fix, add a property with cursor style to the QuillEditor.

That's could not be the best solution. Fast fixes could come with bugs or unexpected behaviors that affect to the end users. We will fix this, but, we need some time to fix other more critical issues and then we will take a look on this types of issues.

lingyun000 commented 2 months ago

最快的修复方法是向 QuillEditor 添加具有光标样式的属性。

这可能不是最好的解决方案。快速修复可能会带来错误或影响最终用户的意外行为。我们会修复这个问题,但我们需要一些时间来解决其他更关键的问题,然后我们才会研究这类问题。

Custom embed causes the cursor to become very large, and when scrolling beyond the screen, clicking makes it switch positions back and forth. Can you take a look at this together?

https://github.com/user-attachments/assets/4ff77d68-cd94-4ac4-9016-1ccf80979e83