Comments (18)
You don't have to sacrifice your turbolinks to get this working as it is - simply use the ajax API so your call to Recaptcha in your form would look like
<%= recaptcha_tags ajax: true %>
from recaptcha.
I will be updating for Rails 4 soon! Thanks for bringing this up.
from recaptcha.
Thanks!
from recaptcha.
I have the same issue. Any progress?
from recaptcha.
I have avoided the issue putting "data-no-turbolink" => true
in the link who leads to the page that has the recaptcha tag. That causes a complete reload of the page, so the recapcha form will render properly.
from recaptcha.
@bismark64 : Thanks, it works perfect ;)
from recaptcha.
Here is how you might be able to fix it. This is how I fixed a problem with jQuery and Turbolinks. There is a page:load event.
from recaptcha.
Using ajax: true
seems to put an iframe pointing to about:blank
at the end of the document. o.o
This adds some padding after my footer and messes it up.
Edit: Setting iframe { display: block; }
seems to have fixed my problem, so ajax: true
seems to have solved my problem, thanks! :)
from recaptcha.
Thanks @freelancewebdev, that fixed this problem for me!
I didn't have issues with the added iFrame messing up my page layout, but it's good to see that a solution for that possible problem being fixed too. Thanks @peteykun!
from recaptcha.
Using jquery-turbolinks
does not help but
<%= recaptcha_tags ajax: true %>
indeed does.
from recaptcha.
hi @ambethia , what's the progress of Rails 4 compatibility ?
from recaptcha.
@FLemon It does work with Rails 4
from recaptcha.
@bodrovis , which version is Rails4, and is it compatible with both Rails3 and 4(as i am upgrading my app to Rails4 in transitional steps)
from recaptcha.
@bodrovis , the current latest i presume ?
from recaptcha.
@FLemon Well, in my Rails 4.1.6 project it does work and it used to work with Rails 3. Feel free to try it out :)
from recaptcha.
cool @bodrovis thanks for your reply
from recaptcha.
Experiencing this issue now in a Rails 5.2 implementation (with Turbolinks). I'm using reCAPTCHA v3, however, parsing the ajax: true
argument to the recaptcha_v3
method has no effect, and doesn't seem to be included in the table of available arguments under the recaptcha_v3
heading of the README. Is there a solution for this issue that will work for reCAPCTHA v3 implementation? Thanks
from recaptcha.
please make a PR if you find a solution ... best start with bundle open recaptcha
and debug from there
from recaptcha.
Related Issues (20)
- recaptcha_v3 causing Content Security Policy: Ignoring “'unsafe-inline'” HOT 2
- TypeError with oddly shaped "g-recaptcha-response" params HOT 1
- Throw an error in verify_recaptcha if recaptcha_reply is empty? HOT 1
- grecaptcha is not defined in rails 6 on test environment HOT 2
- Support for recaptcha enterprise? HOT 1
- :callback on verify_recaptcha not working
- ReferenceError: grecaptcha is not defined HOT 3
- g-recaptcha-response-data got empty value on the first time load on 5.8.1 HOT 2
- recaptcha succeeds on view but verify_recaptcha fails in ruby HOT 3
- ActionView::Template::Error: undefined local variable or method `recaptcha_tags' for #<#<Class:0x000055bd2eb3da08>:0x000055bd2f577618> HOT 1
- Enterprise version HOT 5
- Rails 7 / Turbo : g-recaptcha-response is empty HOT 17
- invisible_recaptcha_tags - Redirecting to sessions page upon submission of recaptcha HOT 1
- ReferenceError: grecaptcha is not defined - reCAPTCHA verification failed, please try again. HOT 6
- Invalid API key when using Enterprise HOT 5
- Use www.recaptcha.net when www.google.com is not available? HOT 3
- invisible_recaptcha_tags doesn't work with turbo_streams
- TypeError: Cannot set properties of null at setInputWithRecaptchaResponseTokenForConnectProvider HOT 2
- Remove `json` gem explicit dependency
- No proper documentation/ methods for ENTERPRISE version. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recaptcha.