[New reCAPTCHA] Recaptcha scrolls to bottom of page when verified in iOS

[New reCAPTCHA] Recaptcha scrolls to bottom of page when verified in iOS

  
Forge Component
(9)
Published on 2017-05-10 by leonardo.fernandes
9 votes
Published on 2017-05-10 by leonardo.fernandes

Hi,


Thank you for this Forge Application! It is great and it is helping me out in an application!

I have an application with an iframe. The recaptcha is inside iframe application and the application is also responsive for phones and tablets. There is a small bug I am noticing and I looked it up and it has been noticed by Google and Apple, but still not entirely resolved. However there are workarounds.

The bug is that in an iOS device, after the recaptcha has been verified, it throws the user to the bottom of the page. Because my application is contained within an iframe, it throws the user to the bottom of the iframe instead of the page. https://stackoverflow.com/questions/41889296/google-recaptcha-scroll-to-bottom-of-page-when-verified-on-ios-devices

My workaround that I found online involves using an attribute on the recaptcha called the data-callback. The data callback is triggered when the user submits a recaptcha and it is verified. I also plan on getting the scroll coordinates of the button I have below my recaptcha so I can go directly there after the recaptcha is verified. My problem is I do not know how to access the html to change it to add a data callback attribute pointing to the function "myFunction();"


Could someone explain to me how to access the HTML of the recaptcha forge component so I can add a data callback?


Thank you in advance for any help.