Skip to content

Commit

Permalink
Avoid capturing mouse press when text_editor is unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jan 30, 2025
1 parent ea8696e commit a7bc1e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions widget/src/text_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ where
}
}

if !matches!(binding, Binding::Unfocus) {
shell.capture_event();
}

apply_binding(
binding,
self.content,
Expand All @@ -780,8 +784,6 @@ where
if let Some(focus) = &mut state.focus {
focus.updated_at = Instant::now();
}

shell.capture_event();
}
}
}
Expand Down

0 comments on commit a7bc1e7

Please sign in to comment.