mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
fix: Disable virtual scroll keyboard navigation when editing content or a modal is open. See #759
This commit is contained in:
@@ -149,8 +149,11 @@ function setupKeyboardNavigation() {
|
||||
|
||||
// Store the event listener reference so we can remove it later if needed
|
||||
const keyboardNavHandler = (event) => {
|
||||
// Only handle keyboard events when not in form elements
|
||||
if (event.target.matches('input, textarea, select')) return;
|
||||
// Only handle keyboard events when not in form elements or contenteditable elements
|
||||
if (event.target.matches('input, textarea, select') || event.target.isContentEditable) return;
|
||||
|
||||
// Skip background navigation if a modal is open
|
||||
if (document.body.classList.contains('modal-open')) return;
|
||||
|
||||
// Prevent rapid keypresses
|
||||
const now = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user