hakimel / Ladda

Buttons with built-in loading indicators.

Home Page:http://lab.hakim.se/ladda/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting button to disabled in Start() prevents form submission in Chrome

dmednikov opened this issue · comments

commented

FYI ...
If I have the following code in button click handler the button "disabled" property will be set to true. In that case Chrome will no longer submit the form.

ButtonClickHandler(evt){
   this.$ladda = Ladda.create(evt.target);
   this.$ladda.start();
}

In my case re-enabling the button, and then putting code for disabling the button into the form.submit handler worked the best.

This doesn't look like a bug in Ladda. Rather than triggering Ladda via the button click event, you should do it via the form submit event.