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

[Bug] Mobile caret bug with Flutter 3.22 #819

Closed
badayumut opened this issue Jun 11, 2024 · 1 comment · Fixed by #827
Closed

[Bug] Mobile caret bug with Flutter 3.22 #819

badayumut opened this issue Jun 11, 2024 · 1 comment · Fixed by #827

Comments

@badayumut
Copy link

badayumut commented Jun 11, 2024

Bug Description

Caret has been working incorrectly since flutter 3.22 update. There is a bug in its size and location. can be easily tested in the sample project.

How to Reproduce

Open the latest version appflowy-editor example project in Flutter 3.22 and above SDK with Android Emulator.
Caret size and location behaves unexpectedly

Expected Behavior

Caret size and location calculated correctly

Operating System

Android API 31 - 34

AppFlowy Editor Version(s)

2.5.0 or latest build on Github

Screenshots

Screen_recording_20240611_092614.mp4

Additional Context

No response

@LucasXu0
Copy link
Collaborator

There's a breaking change in Flutter 3.22.x

The getFullHeightForCaret didn't respect the font size anymore if it's in the sub level

                RichText(
                  key: richTextKey,
                  text: const TextSpan(
                    children: [
                      TextSpan(
                        text: 'AppFlowy ',
                        style: TextStyle(
                          inherit: true,
                          color: Color(0xff000000),
                          fontSize: 16.0,
                          decoration: TextDecoration.none,
                        ),
                      ),
                      TextSpan(
                        text: ' Editor',
                        style: TextStyle(
                          inherit: true,
                          color: Color(0xff000000),
                          fontSize: 20.0,
                          decoration: TextDecoration.none,
                        ),
                      ),
                    ],
                  ),

Flutter 3.19.0

xxxx.mp4

Flutter 3.22.0

yyyy.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants