mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -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) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
// Check if it's Ctrl+A (or Cmd+A on Mac)
|
// Check if it's Ctrl+A (or Cmd+A on Mac)
|
||||||
if ((e.ctrlKey || e.metaKey) && e.key === 'a') {
|
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
|
// Prevent default browser "Select All" behavior
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user