diff options
author | 2024-06-17 03:37:00 +0200 | |
---|---|---|
committer | 2024-06-17 03:37:00 +0200 | |
commit | 6c1027af8d54ad21e282337b53097eb196d62c00 (patch) | |
tree | a25ed59cfe5a3197a88b787a4bc4d16af857e645 /widget | |
parent | e9141e7abff3ea59e8bc5d8e2e386d564180e0ae (diff) | |
download | iced-6c1027af8d54ad21e282337b53097eb196d62c00.tar.gz iced-6c1027af8d54ad21e282337b53097eb196d62c00.tar.bz2 iced-6c1027af8d54ad21e282337b53097eb196d62c00.zip |
Fix `text_editor` always capturing scroll events
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/text_editor.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index 41b058af..fc2ade43 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -466,6 +466,12 @@ where shell.publish(on_edit(action)); } Update::Scroll(lines) => { + let bounds = self.content.0.borrow().editor.bounds(); + + if bounds.height >= i32::MAX as f32 { + return event::Status::Ignored; + } + let lines = lines + state.partial_scroll; state.partial_scroll = lines.fract(); |