mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-28 08:28:53 -03:00
fix(recipes): allow Enter to add import tags
This commit is contained in:
@@ -6,8 +6,27 @@ export class RecipeDataManager {
|
||||
this.importManager = importManager;
|
||||
}
|
||||
|
||||
setupTagInputEnterHandler() {
|
||||
const tagInput = document.getElementById('tagInput');
|
||||
if (!tagInput || tagInput.hasEnterAddTagHandler) {
|
||||
return;
|
||||
}
|
||||
|
||||
tagInput.addEventListener('keydown', (event) => {
|
||||
if (event.key !== 'Enter') {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
this.addTag();
|
||||
});
|
||||
|
||||
tagInput.hasEnterAddTagHandler = true;
|
||||
}
|
||||
|
||||
showRecipeDetailsStep() {
|
||||
this.importManager.stepManager.showStep('detailsStep');
|
||||
this.setupTagInputEnterHandler();
|
||||
|
||||
// Set default recipe name from prompt or image filename
|
||||
const recipeName = document.getElementById('recipeName');
|
||||
|
||||
Reference in New Issue
Block a user