Avoid capturing mouse press when text_editor is unfocused

This commit is contained in:
Héctor Ramón Jiménez 2025-01-30 02:47:59 +01:00
parent ea8696eac2
commit a7bc1e7da4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -768,6 +768,10 @@ where
} }
} }
if !matches!(binding, Binding::Unfocus) {
shell.capture_event();
}
apply_binding( apply_binding(
binding, binding,
self.content, self.content,
@ -780,8 +784,6 @@ where
if let Some(focus) = &mut state.focus { if let Some(focus) = &mut state.focus {
focus.updated_at = Instant::now(); focus.updated_at = Instant::now();
} }
shell.capture_event();
} }
} }
} }