The success path of handleConfirm() never reset the isSubmitting flag,
so hide()'s early-return guard (line 209: 'if (isSubmitting) return')
kept the modal visible after a successful delete — leaving the user
looking at a stuck 'Deleting...' dialog while the card had already been
removed by the WebSocket SERIES_DELETED event.
Reset isSubmitting and the confirm button text before calling hide(),
and capture currentKey into a local before hide() nulls it so the
follow-up removeSeries() call receives the right key.
Add null guards and element re-caching in delete-modal.js so the modal
recovers gracefully if its DOM is replaced (e.g. by an HTMX swap) between
init and show().
Also fix the two tests that broke in this environment:
- test_delete_modal.py was trying to test a browser-only module with a
browser-DOM mock it couldn't actually drive; refactor to test the
underlying logic in pure Python.
- test_delete_anime_security.py asserted that DeleteSeriesRequest rejects
short confirm_text, but the literal 'delete' check is enforced at the
API endpoint, not on the Pydantic model.