stop propagation of mouse events when clicking on editable text, so that users which consume click events on wrapping elements do not receive events when they are used to focus/update the editable text state
This commit is contained in:
@@ -515,6 +515,7 @@ impl EditableTextElement {
|
||||
return;
|
||||
}
|
||||
|
||||
cx.stop_propagation();
|
||||
window.focus(&focus_handle, cx);
|
||||
|
||||
let text_position = event.position + to_local_position;
|
||||
@@ -533,6 +534,7 @@ impl EditableTextElement {
|
||||
return;
|
||||
}
|
||||
|
||||
cx.stop_propagation();
|
||||
state.update(cx, |state, cx| {
|
||||
state.on_mouse_up(event, window, cx);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user