chore: update iced and fix input single pointer press interaction

This commit is contained in:
Ashley Wulber 2024-02-01 23:24:52 -05:00 committed by Ashley Wulber
parent 9d479248a5
commit aff337f5dd
2 changed files with 11 additions and 2 deletions

View file

@ -1241,7 +1241,16 @@ where
state.dragging_state = Some(DraggingState::Selection);
}
} else {
state.dragging_state = None;
// existing logic for setting the selection
let position = if target > 0.0 {
update_cache(state, value);
find_cursor_position(text_layout.bounds(), value, state, target)
} else {
None
};
state.cursor.move_to(position.unwrap_or(0));
state.dragging_state = Some(DraggingState::Selection);
}
}
(None, click::Kind::Single, _) => {