BasicTextField doesn't render blank lines correctly
See original GitHub issueIf 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):
abcd
hijk
And compare it against this text:
abcd
x
hijk
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
Thanks for reporting!
Video:
https://user-images.githubusercontent.com/5963351/152497387-fc17614b-346b-47be-bc81-cfa2a4a54b45.mov
Let’s move cursor placing to a separate issue
Fixed in 1.1.0-alpha04