diff options
author | 2024-11-04 23:26:09 +0100 | |
---|---|---|
committer | 2024-11-05 23:52:59 +0100 | |
commit | fec75221f9e7e19f9ad9a00de0fde6f205c2d92b (patch) | |
tree | fa33bbd841e3b5a4d613cf2467245865960ec1db /widget | |
parent | 3482ffecdcadf036b7d61ab3821c6ee661d0ec56 (diff) | |
download | iced-fec75221f9e7e19f9ad9a00de0fde6f205c2d92b.tar.gz iced-fec75221f9e7e19f9ad9a00de0fde6f205c2d92b.tar.bz2 iced-fec75221f9e7e19f9ad9a00de0fde6f205c2d92b.zip |
Fix `text_editor` capturing mouse release events
Diffstat (limited to '')
-rw-r--r-- | widget/src/text_editor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 3bd4c7f9..b6e291e4 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -662,8 +662,6 @@ where cursor, self.key_binding.as_deref(), ) { - shell.capture_event(); - match update { Update::Click(click) => { let action = match click.kind() { @@ -679,6 +677,7 @@ where state.drag_click = Some(click.kind()); shell.publish(on_edit(action)); + shell.capture_event(); } Update::Drag(position) => { shell.publish(on_edit(Action::Drag(position))); @@ -699,6 +698,7 @@ where shell.publish(on_edit(Action::Scroll { lines: lines as i32, })); + shell.capture_event(); } Update::Binding(binding) => { fn apply_binding< @@ -801,6 +801,8 @@ where if let Some(focus) = &mut state.focus { focus.updated_at = Instant::now(); } + + shell.capture_event(); } } } |