react-google-recaptcha
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -0,5 +1,12 @@ | ||
v1.0.5 - Mon 12 Nov 2018 9:25 PST | ||
--------------------------------------- | ||
- Fix promise timeout [(#120)](https://github.com/dozoisch/react-google-recaptcha/issues/12-) | ||
v1.0.4 - Thu 27 Sep 2018 15:14 PST | ||
--------------------------------------- | ||
- add .babelrc to .npmignore [(#111)](https://github.com/dozoisch/react-google-recaptcha/issues/111) | ||
- add .babelrc to .npmignore [(#111)](https://github.com/dozoisch/react-google-recaptcha/issues/111) | ||
@@ -6,0 +13,0 @@ |
@@ -104,5 +104,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
if (this._widgetId !== undefined) { | ||
while (this.captcha.firstChild) { | ||
this.captcha.removeChild(this.captcha.firstChild); | ||
} | ||
this.delayOfCaptchaIframeRemoving(); | ||
this.reset(); | ||
@@ -112,2 +110,18 @@ } | ||
ReCAPTCHA.prototype.delayOfCaptchaIframeRemoving = function delayOfCaptchaIframeRemoving() { | ||
var temporaryNode = document.createElement("div"); | ||
document.body.appendChild(temporaryNode); | ||
temporaryNode.style.display = "none"; | ||
// move of the recaptcha to a temporary node | ||
while (this.captcha.firstChild) { | ||
temporaryNode.appendChild(this.captcha.firstChild); | ||
} | ||
// delete the temporary node after reset will be done | ||
setTimeout(function () { | ||
document.body.removeChild(temporaryNode); | ||
}, 5000); | ||
}; | ||
ReCAPTCHA.prototype.handleRecaptchaRef = function handleRecaptchaRef(elem) { | ||
@@ -114,0 +128,0 @@ this.captcha = elem; |
@@ -115,5 +115,3 @@ "use strict"; | ||
if (this._widgetId !== undefined) { | ||
while (this.captcha.firstChild) { | ||
this.captcha.removeChild(this.captcha.firstChild); | ||
} | ||
this.delayOfCaptchaIframeRemoving(); | ||
this.reset(); | ||
@@ -123,2 +121,18 @@ } | ||
ReCAPTCHA.prototype.delayOfCaptchaIframeRemoving = function delayOfCaptchaIframeRemoving() { | ||
var temporaryNode = document.createElement("div"); | ||
document.body.appendChild(temporaryNode); | ||
temporaryNode.style.display = "none"; | ||
// move of the recaptcha to a temporary node | ||
while (this.captcha.firstChild) { | ||
temporaryNode.appendChild(this.captcha.firstChild); | ||
} | ||
// delete the temporary node after reset will be done | ||
setTimeout(function () { | ||
document.body.removeChild(temporaryNode); | ||
}, 5000); | ||
}; | ||
ReCAPTCHA.prototype.handleRecaptchaRef = function handleRecaptchaRef(elem) { | ||
@@ -125,0 +139,0 @@ this.captcha = elem; |
{ | ||
"name": "react-google-recaptcha", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "React Component Wrapper for Google reCAPTCHA", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -87,5 +87,3 @@ import React from "react"; | ||
if (this._widgetId !== undefined) { | ||
while (this.captcha.firstChild) { | ||
this.captcha.removeChild(this.captcha.firstChild); | ||
} | ||
this.delayOfCaptchaIframeRemoving(); | ||
this.reset(); | ||
@@ -95,2 +93,18 @@ } | ||
delayOfCaptchaIframeRemoving() { | ||
const temporaryNode = document.createElement("div"); | ||
document.body.appendChild(temporaryNode); | ||
temporaryNode.style.display = "none"; | ||
// move of the recaptcha to a temporary node | ||
while (this.captcha.firstChild) { | ||
temporaryNode.appendChild(this.captcha.firstChild); | ||
} | ||
// delete the temporary node after reset will be done | ||
setTimeout(() => { | ||
document.body.removeChild(temporaryNode); | ||
}, 5000); | ||
} | ||
handleRecaptchaRef(elem) { | ||
@@ -97,0 +111,0 @@ this.captcha = elem; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187742
20
655