mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Prevent Ctrl+A behavior in modals by checking for open modals before handling the key event
This commit is contained in:
@@ -36,6 +36,11 @@ export class BulkManager {
|
||||
document.addEventListener('keydown', (e) => {
|
||||
// Check if it's Ctrl+A (or Cmd+A on Mac)
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'a') {
|
||||
// First check if any modal is currently open - if so, don't handle Ctrl+A
|
||||
if (modalManager.isAnyModalOpen()) {
|
||||
return; // Exit early - let the browser handle Ctrl+A within the modal
|
||||
}
|
||||
|
||||
// Prevent default browser "Select All" behavior
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user