mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
feat: Improve cursor handling during drag operations for better user experience
This commit is contained in:
@@ -304,6 +304,9 @@ export function initReorderDrag(dragHandle, loraName, widget, renderFunction) {
|
||||
});
|
||||
|
||||
document.addEventListener('mouseup', (e) => {
|
||||
// Always reset cursor regardless of isDragging state
|
||||
document.body.style.cursor = '';
|
||||
|
||||
if (!isDragging || !draggedElement) return;
|
||||
|
||||
const targetIndex = getDropTargetIndex(container, e.clientY);
|
||||
@@ -356,10 +359,13 @@ export function initReorderDrag(dragHandle, loraName, widget, renderFunction) {
|
||||
dropIndicator = null;
|
||||
}
|
||||
|
||||
// Reset cursor
|
||||
document.body.style.cursor = '';
|
||||
container = null;
|
||||
});
|
||||
|
||||
// Also reset cursor when mouse leaves the document
|
||||
document.addEventListener('mouseleave', () => {
|
||||
document.body.style.cursor = '';
|
||||
});
|
||||
}
|
||||
|
||||
// Function to handle keyboard navigation
|
||||
|
||||
Reference in New Issue
Block a user