mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
fix(modals): preserve model type during navigation (#771)
Move cleanupNavigationShortcuts() call before setting navigationModelType to ensure the correct model type is preserved when using left/right arrow keys to navigate between models. Previously, the cleanup would immediately nullify navigationModelType, causing type-specific modal sections (like trigger words for embeddings and usage tips for loras) to disappear.
This commit is contained in:
@@ -940,8 +940,8 @@ function setupNavigationShortcuts(modelType) {
|
||||
const modalElement = document.getElementById('modelModal');
|
||||
if (!modalElement) return;
|
||||
|
||||
navigationModelType = modelType;
|
||||
cleanupNavigationShortcuts();
|
||||
navigationModelType = modelType;
|
||||
|
||||
navigationKeyHandler = (event) => {
|
||||
if (shouldIgnoreNavigationKey(event)) return;
|
||||
|
||||
Reference in New Issue
Block a user