mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -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
|
// Store the event listener reference so we can remove it later if needed
|
||||||
const keyboardNavHandler = (event) => {
|
const keyboardNavHandler = (event) => {
|
||||||
// Only handle keyboard events when not in form elements
|
// Only handle keyboard events when not in form elements or contenteditable elements
|
||||||
if (event.target.matches('input, textarea, select')) return;
|
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
|
// Prevent rapid keypresses
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
|
|||||||
Reference in New Issue
Block a user