Better bounds on SelectView clickable area
@@ -384,7 +384,13 @@ impl<T: 'static> SelectView<T> {
position,
offset,
} => if let Some(position) = position.checked_sub(offset) {
- if position < self.last_size {
+ let scrollbar_size = if self.scrollbase.scrollable() {
+ (2, 0)
+ } else {
+ (0, 0)
+ };
+ let clickable_size = self.last_size.saturating_sub(scrollbar_size);
+ if position < clickable_size {
fix_scroll = false;
self.focus.set(position.y + self.scrollbase.start_line);
}
