recaptcha icon indicating copy to clipboard operation
recaptcha copied to clipboard

ReCaptcha image challenge cut off in mobile webviews

Open jwoogerd opened this issue 5 years ago • 9 comments

Summary: When initiated from a mobile webview, we're seeing the recaptcha image challenge getting cut off, hiding the submit button.

This appears to be happening for some phone models and not others (e.g. we've gotten reports with an iPhone XS Max and Android phones, but the same user reported that it renders fine on an iPhone 8). Unfortunately, we have not been able to suss out the exact model/OS/browser version(s) that induces this behavior.

Possibly related to https://github.com/google/recaptcha/issues/330.

recaptcha

The user-agent for this example is Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

jwoogerd avatar Oct 16 '19 15:10 jwoogerd

Have the same issue

ArthurStam avatar Nov 27 '19 07:11 ArthurStam

We have same issue.

hainguyenp207 avatar Nov 28 '19 07:11 hainguyenp207

Hi @ArthurStam, @jwoogerd . I switched to recaptcha v3. It works well. Very simple to switch, we only change some code lines and integrate key: secret key(backend side) and data key site (frontend side). I spent two days to find a way to fix it. Don't spend more time to edit css or javascript.

hainguyenp207 avatar Nov 30 '19 07:11 hainguyenp207

Same issue

tonyfreed avatar Jun 09 '20 15:06 tonyfreed

1 year later, still an issue.

For me doesn't happen on regular pages, but affects RTL.

lifecoderua avatar Sep 23 '20 06:09 lifecoderua

Still a major issue. In my case it's due to a negative left value:

bad

If I disable or nullify it, it shows just fine. Maybe it makes the bubble arrow (g-recaptcha-bubble-arrow) end up out of place as it's no longer pointing at the box, but a functioning website obviously is much more important:

good

It already knows the screen size (as the positioning values adjust accordingly), so it should definitely know when it's (partially) outside the view and stop that from happening.

Also, the negative left value will make it end up outside always, without exception, so that should simply be set to a minimum of 0.

snakehill avatar Aug 02 '21 20:08 snakehill

For me, this issue seems to only occur when I start the page in full screen, and then resize it to mobile with the chrome devtools device toolbar.

If I start the page in mobile, the image selection is displayed properly and is centered.

So, to me, it's a non-issue after all.

Tan-Aki avatar Jan 07 '22 15:01 Tan-Aki

I had the same problem. I set up recaptcha v2 and added some css to float the captcha right. Once I removed the float it worked properly.

markwaldin avatar May 19 '23 15:05 markwaldin

Add the following css code and the problem will be solved 🥳🥳


#recaptcha-container
{
  transform: scale(0.77);
  -webkit-transform: scale(0.77);
  transform-origin: 0 0;
  -webkit-transform-origin: 0 0;
}
.g-recaptcha-bubble-arrow
{
  display: none;
}
.g-recaptcha-bubble-arrow + div
{
  position: fixed !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
}

devzarghami avatar Dec 20 '23 16:12 devzarghami