Skip to content

🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!

Fix new-tag creation in edit modal attaching to add wizard instead (tagManager)

Omega (QA)76429978e9ca
diff --git a/frontend/js/components/tagManager.js b/frontend/js/components/tagManager.js
index 06ee65c..f227e64 100644
--- a/frontend/js/components/tagManager.js
+++ b/frontend/js/components/tagManager.js
@@ -120,11 +120,9 @@ function renderDropdownList(container, tags, selected, onSelect, searchTerm = ''
createOption.addEventListener('click', async () => {
try {
const created = await createTag(searchTerm);
- setSelectedTags([...getSelectedTags(), created]);
- renderSelectedTags();
- if (typeof window.updateSummary === 'function') window.updateSummary();
- // Re-render the dropdown to show the new tag as selected
- renderDropdownList(container, [...getAllTags()], getSelectedTags(), onSelect, '');
+ // Route through the context-aware onSelect (add form vs edit modal),
+ // so the new tag lands in the correct selection, not always the add form's.
+ onSelect(created, false);
} finally {
container.classList.remove('show');
}
diff --git a/frontend/settings-new.html b/frontend/settings-new.html
index 084f7bd..0feede3 100644
--- a/frontend/settings-new.html
+++ b/frontend/settings-new.html
@@ -38,9 +38,6 @@
<!-- i18n Configuration -->
<script src="js/i18n.js?v=20250119001"></script>
-
- <!-- Temporary debug script -->
- <script src="js/i18n-debug.js?v=20250119001"></script>
<!-- Mobile menu logic isolated to avoid collisions on settings -->
<script src="mobile-menu.js?v=20250119002" defer></script>