-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
BasicTextField doesn't render blank lines correctly #1781
Comments
By the way, this is turning into a critical and blocking bug for us now :( . The problem is even worse when you enter 2 or more "blank lines" -- they don't get rendered at all. It's really breaking our UI to the point of being dysfunctional. Any chance we can get this patched anytime soon? We really don't want to have implement our own |
Thanks for reporting! Video: Screen.Recording.2022-02-04.at.11.34.35.movLet's move cursor placing to a separate issue |
Thanks, @igordmn ! do you have an idea on when you think a patch / minor release can be published for the fix? |
I will try to investigate this next week, then it depends on complexity. As this issue is partially "fixed" (the first empty line is with the right height), I think there won't be huge obstacles to fix it. |
I don't think the first blank line has the right height, btw. See my screenshot above. The line gaps are missing. However, it's true that the second (or more) blank lines are worse. |
TextField() has the same Issue. Here you can work around it with increasing the |
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781
Fixed in 1.1.0-alpha04 |
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781 Change-Id: Ic628a489b7a39f832b172a0d3d5220a4d40778d6
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781 Change-Id: Ic628a489b7a39f832b172a0d3d5220a4d40778d6 Test: ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781 # Conflicts: # compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781 # Conflicts: # compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
SkiaParagraph doesn't use span style to determine the height of the empty/blank line. It uses main style of the paragraph, which we haven't set. Fixes JetBrains/compose-multiplatform#1781 # Conflicts: # compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
If you create a multiline
BasicTextField
(singleLine = false
), and enter a "blank line" (an empty line without any character, or a line with just whitespace),BasicTextField
will nor render the text correctly.For example, let's take this text (you can put a space in the empty line if you want):
And compare it against this text:
First of all, you will see that the empty line will not have the same height as the others -- it will be shorter. See example below.
See screenshot below. The pink border represents the
BasicTextField
.Second, in the scenario above, if you enter any number of white space (e.g. 3 spaces), when you move your cursor to the end of the next/previous line that is also longer (e.g. 6 characters), then using the keyboard you move the cursor up/down ONTO that line with the whitespaces, the cursor on the line with only whitespaces will not be shown correctly. The height will be wrong (I suspect because of the first issue above), but also the position is wrong as it always start at position 0, even though it has 3 characters. It should be placed at the end of the 3 whitespace, when moving from another line at a longer position, e.g. 6 chars.
The text was updated successfully, but these errors were encountered: