singerdmx / flutter-quill

Rich text editor for Flutter

Home Page:https://pub.dev/packages/flutter_quill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When inputting more than 2 characters at a time, the toolbar style change will be invalid.

Buzhifanji opened this issue · comments

Is there an existing issue for this?

Flutter Quill version

9.3.11

Steps to reproduce

  1. Enter any text you want, as long as there are candidates in the input method that are more than 2 characters long.
  2. Toolbar switches font size or color。
  3. Click on the candidate content of more than 2 characters in the input method
  4. The style selected in the second step does not take effect

Expected results

No matter how much text is entered, the toolbar switching style will take effect

Actual results

When more than two characters are entered at one time, the switching style will not take effect.

Code sample

After a day of hard work, I have found the code location that caused the bug.

This judgment condition will result in that when the user inputs more than 2 words, the toggledStyle cannot be obtained.

You should distinguish between user pasting and candidate input. The pasted content has styles, while the candidate content in the input method has no style.

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

I have the same problem, is there any temporary solution?