Skip to content

Commit 73f9616

Browse files
committed
Avoid recpatcha on focus at checkout page to avoid problem
1 parent ff90d64 commit 73f9616

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.0]
9+
### Fixed
10+
- Avoid recpatcha on focus at checkout page
11+
812
## [1.0.0] - 2024-11-06
913
### Added
1014
- Initial version

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Serfe"
99
}
1010
],
11-
"version": "1.0.0",
11+
"version": "1.1.0",
1212
"minimum-stability": "stable",
1313
"require": {
1414
"magento/module-re-captcha-frontend-ui": "*"

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="Serfe_SmartRecaptchaLoader" setup_version="1.0.0">
3+
<module name="Serfe_SmartRecaptchaLoader" setup_version="1.1.0">
44
<sequence>
55
<module name="Magento_ReCaptchaFrontendUi"/>
66
</sequence>

view/frontend/web/js/reCaptcha.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ define(
4343
initialize: function () {
4444
this._super();
4545

46-
this.attachFocusEvent();
46+
if (window.location.href.includes('checkout')) {
47+
this._loadApi();
48+
} else {
49+
this.attachFocusEvent();
50+
}
4751
},
4852

4953
attachFocusEvent: function () {

0 commit comments

Comments
 (0)