@pernod-ricard-global-cms/jsutils 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsutils.mjs +7 -3
- package/package.json +1 -1
package/jsutils.mjs
CHANGED
|
@@ -639,9 +639,13 @@ async function handleCTBClick(event) {
|
|
|
639
639
|
window.isCTBLoaded = true;
|
|
640
640
|
|
|
641
641
|
// This is important!! Never remove this code
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
642
|
+
const clonedEvent = new event.constructor(event.type, event);
|
|
643
|
+
const repeatEventInterval = setInterval(() => {
|
|
644
|
+
event.target.dispatchEvent(clonedEvent);
|
|
645
|
+
if (document.querySelector('.ctbuy-modal') !== null) {
|
|
646
|
+
clearInterval(repeatEventInterval);
|
|
647
|
+
}
|
|
648
|
+
}, 100)
|
|
645
649
|
}
|
|
646
650
|
}
|
|
647
651
|
|