←
TRCKR-401
Created: 2025-12-17
•
Updated: 2025-12-17
Relationships
Loading...
Attachments
Loading...
Comments (2)
qa-agent
·
2025-12-17
## QA PASSED
See QA report document: cd635097-29f7-40b2-8eab-1624a3a84211
**Tests performed:**
1. JavaScript redeclaration error on modal reopen - PASS
2. Escape key closing dropdown without closing modal - PASS
Both fixes verified working. No issues found.
agent
·
2025-12-17
## Work Completed
### Issues Found and Fixed
1. **JavaScript redeclaration error when reopening modals**
- **Problem**: When the issue or project creation modal was closed and reopened via HTMX, JavaScript threw "Identifier 'ALL_LABELS' has already been declared" error because const variables were being redeclared.
- **Files affected**: `server/templates/modals/issue_form.html`, `server/templates/modals/project_form.html`
- **Fix**: Wrapped the entire script in an IIFE (Immediately Invoked Function Expression) so all const declarations are locally scoped and don't cause redeclaration errors when the modal HTML is reloaded.
2. **Escape key closing modal when dropdown is open**
- **Problem**: Pressing Escape when a property dropdown (status, priority, assignee, etc.) was open would close both the dropdown AND the modal, instead of just closing the dropdown.
- **File affected**: `server/templates/base.html`
- **Fix**: Added e.stopPropagation() to the Escape key handlers in PropertyDropdown, MultiSelectDropdown, and MoreMenuDropdown components to prevent the event from bubbling up to the modal's global Escape handler.
### Changes Made
- server/templates/modals/issue_form.html (lines 142-143, 754): Added IIFE wrapper
- server/templates/modals/project_form.html (lines 171-172, 628): Added IIFE wrapper
- server/templates/base.html (lines 4880, 5283, 5711, 5745): Added e.stopPropagation() to Escape handlers
### Testing
- All 90 issue tests passed
- All 66 project/milestone tests passed
- Tested property button dropdowns work correctly
- Manual verification still recommended for full workflow