the scroll happens automatically when using the EASY hCaptcha setting on https://dashboard.hcaptcha.com/. Switching to Auto stops the auto-scroll to it’s location, but when the visitor scrolls using the mouse, it jumps to the hCaptcha too.
I turned it off as I need to use the website mentioned above.
Thank you for reporting. First of all, the WordPress plugin does nothing with scrolling. It may be a side effect of the hCaptcha API script, but I do not have access to its code and just use it as is in the plugin.
The EASY finding is valuable. I will try to reproduce the issue, and report it to hcaptcha.com.
P.S. Could you create a similar page to see the effect? Thanks.
-
This reply was modified 1 week, 1 day ago by
kaggdesign.
here you go: https://www.jsadvokat.sk/hcaptcha-test/
I have hidden hcaptcha on the homepage using CSS, so it doesn’t do that there, but that’s only temporary, I’ll remove this test page in about a week.
actually scratch that, silly me – it’s not enough to hide it using CSS, I would need to somehow unhook the script from the form as the form won’t send without the captcha check.
As the website is live, I have deleted the captcha test page, because it was breaking the homepage too.
I tried to reproduce it locally, but no luck.
Can you re-create a test page? You can turn off hCaptcha on your kontakt
page following the instruction.
In your case, you should add the following filter.
/**
* Filters the protection status of a form.
*
* @param string $value The protection status of a form.
* @param string[] $source The source of the form (plugin, theme, WordPress Core).
* @param int|string $form_id Form id.
*
* @return bool
*/
function hcap_protect_form_filter( $value, $source, $form_id ) {
if ( ! in_array( 'kadence-blocks/kadence-blocks.php', $source, true ) ) {
return $value;
}
if ( 7 !== $form_id ) {
return $value;
}
return false;
}
add_filter( 'hcap_protect_form', 'hcap_protect_form_filter', 10, 3 );
This filter will block hCaptcha on kontakt
page but let it work on any other test page.