Reset modifiers when the window active state changes (#28348)
Closes #23449 Release Notes: - Fixed a bug causing shift to get stuck down when the window focus changes --------- Co-authored-by: Dino <dinojoaocosta@gmail.com>
This commit is contained in:
parent
ed500dacb6
commit
324e4658ba
2 changed files with 2 additions and 0 deletions
|
@ -845,6 +845,7 @@ impl Window {
|
||||||
handle
|
handle
|
||||||
.update(&mut cx, |_, window, cx| {
|
.update(&mut cx, |_, window, cx| {
|
||||||
window.active.set(active);
|
window.active.set(active);
|
||||||
|
window.modifiers = window.platform_window.modifiers();
|
||||||
window
|
window
|
||||||
.activation_observers
|
.activation_observers
|
||||||
.clone()
|
.clone()
|
||||||
|
|
|
@ -2736,6 +2736,7 @@ async fn test_multiple_marked_entries(cx: &mut gpui::TestAppContext) {
|
||||||
shift: true,
|
shift: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
cx.run_until_parked();
|
||||||
cx.simulate_modifiers_change(modifiers_with_shift);
|
cx.simulate_modifiers_change(modifiers_with_shift);
|
||||||
cx.update(|window, cx| {
|
cx.update(|window, cx| {
|
||||||
panel.update(cx, |this, cx| {
|
panel.update(cx, |this, cx| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue