Search code examples
javascriptjqueryhtmlcssrecaptcha

reCAPTCHA causes a long horizontal scroll on RTL pages


When user clicks on "I'm not a robot" in reCAPTCHA v2, it adds a div to the page like this:

<div style="display: block; visibility: hidden; position: absolute; width: 414px; left: -10000px; top: -10000px; height: 610px; z-index: 2000000000;">

The div contains another div with gc-bubbleDefault class. It causes a so long horizontal scroll because of left: -10000px; top: -10000px;.

How to avoid Google reCAPTCHA to sabotage my website?

Look at the firebug window. you can see the div appended to the page before the body close tag. enter image description here

EDIT

I found out that this problem happens just on RTL pages due to negative left -10000px of element. Shame on Google for using such an idiot idea.

Is there any solution to solve it?


Solution

  • I had the same problem and I solved this by adding

    overflow-x: hidden;
    

    to body element.

    this article can help you throw this.

    hope it can help you