KamoCRM

Enable Finish button by polling widget.getState() and switching to auto=onload

Fixkamo-register
Shipped
28 ஏப்ரல், 2026 அன்று 8:59 PM UTC
Author
Kamo
Commit
dda4cf9

The statechange event listener was not reliably enabling the Finish button after *** verification. Two root causes: 1. The drain logic read widgetAny.state which does not exist on the widget — the widget exposes getState() not a .state property, so the drain was always a no-op when the listener attached after verification. 2. auto="onfocus" does nothing without a parent <form> element; the widget never auto-started, requiring a manual checkbox click that could race the listener attachment window. Fix: add a 250ms polling fallback using widget.getState() alongside the existing DOM event listener. Either path sets CapchaVerified=true. Switch to auto="onload" so the PoW challenge starts automatically when the Finish step renders, giving the listener plenty of time to attach.

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