Scroll TextEditor only if cursor.is_over(bounds)

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 01:23:50 +02:00
parent ff78e97ad7
commit 29fb4eab87
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -539,7 +539,9 @@ impl Update {
}
_ => None,
},
mouse::Event::WheelScrolled { delta } => {
mouse::Event::WheelScrolled { delta }
if cursor.is_over(bounds) =>
{
action(Action::Scroll {
lines: match delta {
mouse::ScrollDelta::Lines { y, .. } => {