When inputting more than 2 characters at a time, the toolbar style change will be invalid.
Buzhifanji opened this issue · comments
huangbin commented
Is there an existing issue for this?
- I have searched the existing issues
Flutter Quill version
9.3.11
Steps to reproduce
- Enter any text you want, as long as there are candidates in the input method that are more than 2 characters long.
- Toolbar switches font size or color。
- Click on the candidate content of more than 2 characters in the input method
- 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]
BowieY commented
I have the same problem, is there any temporary solution?