johannesjo / angular2-promise-buttons

Chilled loading buttons for angular2
https://johannesjo.github.io/angular2-promise-buttons/#demo
MIT License
86 stars 28 forks source link

promiseBtn breaks ngSubmit if handleCurrentBtnOnly is true #7

Closed ghost closed 7 years ago

ghost commented 7 years ago

Working version: http://plnkr.co/edit/3ZWAgkDc59O60n7mO8U6?p=preview click Simple Submit and promiseBtn submit. You should see an Alert after both clicks.

Broken version: http://plnkr.co/edit/nL3Wj3ADkjcAKWXsWku6?p=preview After I add handleCurrentBtnOnly option the promiseBtn submit doesn't work anymore

johannesjo commented 7 years ago

Thank you very much for reporting. I'll look into it.

johannesjo commented 7 years ago

Very very very weird. Somehow the model change detection is disabled when the button is disabled inside a form. No clue why, but setting a timeout seems to help. Should be available in the current release.