Block extra drag events in original drag handlers
This commit is contained in:
parent
ee66f99ce6
commit
354c020612
4 changed files with 16 additions and 1 deletions
|
@ -172,6 +172,10 @@ impl EditorElement {
|
|||
.on_drag(MouseButton::Left, {
|
||||
let position_map = position_map.clone();
|
||||
move |event, editor, cx| {
|
||||
if event.end {
|
||||
return;
|
||||
}
|
||||
|
||||
if !Self::mouse_dragged(
|
||||
editor,
|
||||
event.platform_event,
|
||||
|
@ -1235,6 +1239,10 @@ impl EditorElement {
|
|||
})
|
||||
.on_drag(MouseButton::Left, {
|
||||
move |event, editor: &mut Editor, cx| {
|
||||
if event.end {
|
||||
return;
|
||||
}
|
||||
|
||||
let y = event.prev_mouse_position.y();
|
||||
let new_y = event.position.y();
|
||||
if thumb_top < y && y < thumb_bottom {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue