@@ -305,7 +305,13 @@ impl App { |
| 305 | 305 | return; |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | | - // Check sidebar clicks |
| 308 | + // Check sidebar clicks - try to start bookmark drag first |
| 309 | + if self.sidebar.start_bookmark_drag(pos) { |
| 310 | + // Started potential bookmark drag, don't navigate yet |
| 311 | + return; |
| 312 | + } |
| 313 | + |
| 314 | + // Check sidebar clicks (for non-bookmark items) |
| 309 | 315 | if let Some(path) = self.sidebar.on_click(pos) { |
| 310 | 316 | self.navigate_to(path); |
| 311 | 317 | return; |
@@ -408,7 +414,18 @@ impl App { |
| 408 | 414 | |
| 409 | 415 | /// Handle mouse release. |
| 410 | 416 | fn handle_mouse_release(&mut self, pos: Point) { |
| 411 | | - // Handle bookmark drag drop |
| 417 | + // Handle bookmark reorder drag completion |
| 418 | + if self.sidebar.is_bookmark_dragging() { |
| 419 | + self.sidebar.complete_bookmark_drag(); |
| 420 | + } else if self.sidebar.bookmark_drag_index().is_some() { |
| 421 | + // Clicked on bookmark but didn't drag - navigate to it |
| 422 | + if let Some(path) = self.sidebar.bookmark_path_at_index() { |
| 423 | + self.navigate_to(path); |
| 424 | + } |
| 425 | + self.sidebar.cancel_bookmark_drag(); |
| 426 | + } |
| 427 | + |
| 428 | + // Handle bookmark drag drop (dragging from file view to sidebar) |
| 412 | 429 | if self.drag_active { |
| 413 | 430 | if let Some(path) = self.drag_source_path.take() { |
| 414 | 431 | if self.sidebar.is_bookmark_drop_zone(pos) { |
@@ -467,7 +484,12 @@ impl App { |
| 467 | 484 | } |
| 468 | 485 | } |
| 469 | 486 | |
| 470 | | - // Handle bookmark drag in progress |
| 487 | + // Handle bookmark reorder drag in progress |
| 488 | + if self.sidebar.bookmark_drag_index().is_some() { |
| 489 | + self.sidebar.update_bookmark_drag(pos); |
| 490 | + } |
| 491 | + |
| 492 | + // Handle bookmark drag in progress (dragging from file view) |
| 471 | 493 | if self.drag_source_path.is_some() { |
| 472 | 494 | // Update current drag position for visual feedback |
| 473 | 495 | self.drag_current_pos = Some(pos); |