Fix text_editor capturing mouse release events
This commit is contained in:
parent
3482ffecdc
commit
fec75221f9
1 changed files with 4 additions and 2 deletions
|
|
@ -662,8 +662,6 @@ where
|
||||||
cursor,
|
cursor,
|
||||||
self.key_binding.as_deref(),
|
self.key_binding.as_deref(),
|
||||||
) {
|
) {
|
||||||
shell.capture_event();
|
|
||||||
|
|
||||||
match update {
|
match update {
|
||||||
Update::Click(click) => {
|
Update::Click(click) => {
|
||||||
let action = match click.kind() {
|
let action = match click.kind() {
|
||||||
|
|
@ -679,6 +677,7 @@ where
|
||||||
state.drag_click = Some(click.kind());
|
state.drag_click = Some(click.kind());
|
||||||
|
|
||||||
shell.publish(on_edit(action));
|
shell.publish(on_edit(action));
|
||||||
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
Update::Drag(position) => {
|
Update::Drag(position) => {
|
||||||
shell.publish(on_edit(Action::Drag(position)));
|
shell.publish(on_edit(Action::Drag(position)));
|
||||||
|
|
@ -699,6 +698,7 @@ where
|
||||||
shell.publish(on_edit(Action::Scroll {
|
shell.publish(on_edit(Action::Scroll {
|
||||||
lines: lines as i32,
|
lines: lines as i32,
|
||||||
}));
|
}));
|
||||||
|
shell.capture_event();
|
||||||
}
|
}
|
||||||
Update::Binding(binding) => {
|
Update::Binding(binding) => {
|
||||||
fn apply_binding<
|
fn apply_binding<
|
||||||
|
|
@ -801,6 +801,8 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue