Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
Buzhifanji opened this issue May 14, 2024 · 1 comment · Fixed by #1890
Closed
1 task done
Labels
bug Something isn't working

Comments

@Buzhifanji
Copy link

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]
@Buzhifanji Buzhifanji added the bug Something isn't working label May 14, 2024
@BowieY
Copy link

BowieY commented May 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants