Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

[BUG] The cursor moves incorrectly across a multiline input field #66

Open
FreshL1me opened this issue Jun 3, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@FreshL1me
Copy link

Describe the bug
The text cursor can be moved by left-clicking on the desired position in the text. It is with him that these bugs are related:

  • Left-click only works on the very last line in the input field. If the message is placed in only one line, then everything works fine.
  • If the message takes up a lot of lines in the input field, then when you left-click on the very last line, the cursor does not move to the position in which it was expected
  • Under unclear circumstances (it depends on the text), sometimes the text cursor is programmatically positioned at the end of the text, but visually it is shifted to the left by 1-3 characters (see the screenshot)

Minecraft Info
Minecraft information:

  • AdvancedChatCore-1.19.4-1.5.10
  • fabric-api-0.83.0+1.19.4
  • malilib-fabric-1.19.4-0.15.4

To Reproduce
Steps to reproduce the behavior:

  1. Open chat
  2. Write a text so long that it is transferred to the second line
  3. Try to move the text cursor by clicking the left mouse button to the desired position for you
  4. Try to select the text. Place the text cursor in the first position, and then move the mouse cursor to another position and press the left button while holding down the shift key

Expected behavior
When left-clicking, the text cursor moves to the position where the symbol that was clicked is located
When the left mouse button is clicked with the Shift key pressed, the subtext located between the text cursor and the mouse cursor is selected

Screenshots
image

Additional context
In addition, I use the Advanced Chat HUD mod, although I tested this bug without it. If the chat message is so long that it is divided into several lines, then, as can be seen in the screenshot, the icons (create a new window, delete all windows, settings) intersect with the message input field. I would like to fix this too (for example, so that the icons dynamically rise and fall above the input field)!

@FreshL1me FreshL1me added the bug Something isn't working label Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant