Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reposition badge to the bottom left #359

Open
esale opened this issue Apr 10, 2020 · 1 comment
Open

Can't reposition badge to the bottom left #359

esale opened this issue Apr 10, 2020 · 1 comment

Comments

@esale
Copy link

esale commented Apr 10, 2020

Hi,
I think that I should be able to reposition the recaptcha invisible badge to bottom left by adding badge: "bottomleft" to the helper call, like this:

<%= recaptcha_v3(name: 'g-recaptcha-response-contact', action: 'contact', badge: "bottomleft") %>

however, it doesn't work. I can see when I inspect that it has some effect:

<input type="hidden" name="g-recaptcha-response-contact" id="g-recaptcha-response-data-contact" data-sitekey="..." data-badge="bottomleft" [...]

<iframe src="https://www.google.com/recaptcha/api2/anchor? [...] &amp;size=normal&amp;badge=bottomleft& [...]

but it still doesn't work, the div that matters has the wrong style:

<div class="grecaptcha-badge" data-style="bottomright" [...]</div>

I solved it with CSS extracted from this stack overflow answer:

 .grecaptcha-badge {
  width: 70px !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
  left: 4px !important;
}


.grecaptcha-badge:hover {
  width: 256px !important;
}

but I'd like to know if there is a way to solve it without CSS.

On a side note, I don't know what's the proper way to insert code here, I used backticks with the html and the greater than symbol with the CSS and neither shows it right.

Regards.

@bragovo
Copy link

bragovo commented Jun 10, 2021

I have the same problem but I need an inline badge and can't use CSS. Why data attributes not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants