Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
set pristine=false in response/expired handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
jab committed Oct 8, 2015
1 parent a93bfb9 commit 1c7f951
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions google-recaptcha.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
* @param {String} response response to store
*/
_responseHandler: function (response) {
this.pristine = false;
this.invalid = false;
this.response=response;
this.fire('captcha-response',{response:response});
Expand All @@ -271,6 +272,7 @@
* The `expiredHandler` method fires the captcha-expired event.
*/
_expiredHandler: function () {
this.pristine = false;
this.invalid = true;
this.fire('captcha-expired');
}
Expand Down

1 comment on commit 1c7f951

@jab
Copy link
Author

@jab jab commented on 1c7f951 Oct 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about set pristine to false in _responseHandler and _expiredHandler. It can make sense to have visual rendering even if you havn't click on the submit button.

good idea @cbalit, thanks!

Please sign in to comment.