diff options
| author | 2025-02-03 17:12:08 +0100 | |
|---|---|---|
| committer | 2025-02-03 17:12:08 +0100 | |
| commit | 141290c7402a4e087ce18d60b210f4feeafcebee (patch) | |
| tree | e3225f5b2eada0c35156dbf5eef53f034e56f37c /widget | |
| parent | e8c680ce66b6b766a196e799b209e73e0bf416ab (diff) | |
| download | iced-141290c7402a4e087ce18d60b210f4feeafcebee.tar.gz iced-141290c7402a4e087ce18d60b210f4feeafcebee.tar.bz2 iced-141290c7402a4e087ce18d60b210f4feeafcebee.zip | |
Fix `InputMethod` conflicts with multiple scrollables
Diffstat (limited to 'widget')
| -rw-r--r-- | widget/src/scrollable.rs | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 0a93584e..053b7df6 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -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; +                    }                  }              }; | 
