File tree 1 file changed +9
-0
lines changed
apps/blog/src/app/providers/tracking
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ export const cookieConsentConfig = {
27
27
cookie : {
28
28
name : 'cc_cookie_al' ,
29
29
} ,
30
+ onModalShow : ( ) => {
31
+ const ccEl = document . getElementById ( 'cc-main' ) ;
32
+ // Check if the cookie consent dialog has been hidden by injected styles from an external extension (e.g., "I don't care about cookies").
33
+ // To respect this and avoid issues with the `disablePageInteraction` flag, we manually remove the overlay that blocks page interaction.
34
+ if ( ccEl && window . getComputedStyle ( ccEl ) . display === 'none' ) {
35
+ // Reference: https://github.com/orestbida/cookieconsent/blob/e6279509aab5b96be198297b0283b321ad76b0a9/src/utils/constants.js#L8C50-L8C70
36
+ document . documentElement . classList . remove ( 'disable--interaction' ) ;
37
+ }
38
+ } ,
30
39
onConsent : ( ) => {
31
40
window . dataLayer . push ( { event : 'consent_update' } ) ;
32
41
window . dispatchEvent ( new CustomEvent ( 'ptupdate' ) ) ;
You can’t perform that action at this time.
0 commit comments