hCaptcha / react-hcaptcha

hCaptcha Component Library for ReactJS and Preact
MIT License
371 stars 42 forks source link

hcaptcha has alignment issues causing ugly white background to show up in darkmode #225

Closed tilkinsc closed 2 months ago

tilkinsc commented 8 months ago

Reproduced on both edge and firefox. Version 1.10.1

image

            <HCaptcha
                sitekey="10000000-ffff-ffff-ffff-000000000001"
                onVerify={(token, eKey) => 1}
                reCaptchaCompat={false}
                />

I have dug into the html and it appears that the body of the iframe that gets injected is at fault. On the left, you can see me editing around with the style of the html as shown below. On the right thats the vanilla code you see above. image

I am using vite, bootstrap, and react-router-dom. This background doesn't seem respective to those being present. Proven by deleting all the css on the page, as shown below. image

zoryana94 commented 8 months ago

Hi @tilkinsc,

Thank you for notifying us about the issue! We will keep you posted

Best Regards hCaptcha Dev Team

Red-Killer commented 8 months ago

Yep got the same issue looks very ugly image

anilmawji commented 2 months ago

This is still an issue. When will it be fixed? Since it's an iframe we are at hCaptcha's mercy when it comes to the styling..

devlsh commented 2 months ago

@brdlyptrs if this is completed can we get a new release please? the issue still persists as of the latest version available - thanks!

brdlyptrs commented 2 months ago

Hi @oyed! We've updated the core code to have a transparent background for both the body and html of the checkbox iFrame. If you are still seeing an issue, can you please provide some more details so that we can take a further look?

VlldmrS commented 2 weeks ago

image

The problem is still relevant, it spoils the design of the form

VlldmrS commented 2 weeks ago

Next 15, Turbopack, Chakra UI

VlldmrS commented 2 weeks ago

image

The problem is on the iframe side. If you change the transparent background of the body to the one in the theme (for example, in my case, black), then the problem is eliminated.