KamoCRM

Properly clean up Capcha event listeners on step transition

Fixkamo-login
Shipped
19 ஏப்ரல், 2026 அன்று 4:28 PM UTC
Author
Kamo
Commit
f8635a7

The removeEventListener calls were inside the setTimeout callback's return value, which JavaScript ignores. This caused handlers to accumulate on every user→pass step transition, making performLogin fire multiple times when Capcha verified. Fixed by tracking the cleanup function in a variable outside the setTimeout, the same pattern used in PostCompletionScreen.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing