mojira.dev
MCPE-186409

Clicking text to reposition caret is wrong if the text box isn't scrolled fully right

Relates to but definitely distinct from MCPE-174362. When you have a long message in the chat bar, and click in the text somewhere to move your cursor, it only works properly if the message is scrolled all the way to the right. If it's not, the cursor ends up in the wrong place.

How to reproduce

1. Paste this message into chat:

This is a long text message that I am typing with the hopes that it will scroll the chat bar and reveal the bug right now very interesting

2. Click to the left side of the message to move the cursor there (it works)

3. Press the left arrow key several times to scroll the message left
3. Now click any text

Expected behavior
The cursor should go where you click

Observed behavior
It goes to some random character instead

Linked issues

Comments 1

I could reproduce through in Android with keyboard & mouse connected.

tryashtar

(Unassigned)

1358175

Confirmed

Multiple

1.21.40.20 Preview, 1.21.23 Hotfix, 1.21.60.24 Preview, 1.21.70.22 Preview

Retrieved