Skip to content

fix: Use adjusted instead of absolute cursor position in TextInput#3221

Open
Koranir wants to merge 3 commits intoiced-rs:masterfrom
Koranir:fix-3214
Open

fix: Use adjusted instead of absolute cursor position in TextInput#3221
Koranir wants to merge 3 commits intoiced-rs:masterfrom
Koranir:fix-3214

Conversation

@Koranir
Copy link
Contributor

@Koranir Koranir commented Jan 21, 2026

Fixes #3214

I missed it initially, but TextInput is using the absolute position of the cursor in the cursor/touch events instead of the adjusted values given by the parent widget.

Note: I don't know if it's better to use cursor.position_over or cursor.position_in here, both seemed to work? Additionally, this might break touch, I can't test that. Neither are proper here.

P.S. It might be worth looking into removing the position values from the Cursor/FingerMoved events to avoid this happening in the future.

Makes it so that when the cursor moves off the input, selection will still continue.
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 this pull request may close these issues.

Selection in a TextInput breaks when put in a horizontal scrollable

1 participant