Fix InputMethod conflicts with multiple scrollables

This commit is contained in:
Héctor Ramón Jiménez 2025-02-03 17:12:08 +01:00
parent e8c680ce66
commit 141290c740
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 48 additions and 28 deletions

View file

@ -727,6 +727,8 @@ where
_ => mouse::Cursor::Unavailable,
};
let had_input_method = shell.input_method().is_open();
let translation =
state.translation(self.direction, bounds, content_bounds);
@ -745,10 +747,12 @@ where
},
);
if let InputMethod::Open { position, .. } =
shell.input_method_mut()
{
*position = *position + translation;
if !had_input_method {
if let InputMethod::Open { position, .. } =
shell.input_method_mut()
{
*position = *position + translation;
}
}
};