From f5945f45d3e841671baafa3834291eb59117b354 Mon Sep 17 00:00:00 2001 From: alex-ds13 <145657253+alex-ds13@users.noreply.github.com> Date: Tue, 25 Nov 2025 16:11:31 +0000 Subject: fix: outbounds selecting when inside a scrollable - If we were dragging a selection and move the mouse out of bounds of the text widget and an the same time it went out of bounds of a parent scrollable, the cursor would be levitated so we weren't getting it's cursor position. Now we land the cursor before checking the position. --- src/text/rich.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/text/rich.rs') diff --git a/src/text/rich.rs b/src/text/rich.rs index e54b64a..060ab26 100644 --- a/src/text/rich.rs +++ b/src/text/rich.rs @@ -657,7 +657,7 @@ where } Event::Mouse(mouse::Event::CursorMoved { .. }) | Event::Touch(touch::Event::FingerMoved { .. }) => { - if let Some(position) = cursor.position() + if let Some(position) = cursor.land().position() && let Some(dragging) = state.dragging { let (line, index) = state -- cgit v1.2.3