Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Plugin breaks some scripts

$
0
0

Replies: 0

Hello,

After pressing “Accept all” some things stop working (after 2 seconds):
1. Search button on the sticked to the right bar.
2. Menu humburger on mobile.

I noticed that it gets fixed if I comment “dispatch” stroke in file complianz-gdpr/assets/js/complianz.js

function cmplzRunAfterAllScripts() {
   console.log('cmplzRunAfterAllScripts');
   if (!cmplzAllScriptsHookFired && cmplzArrayIsEmpty(waitingInlineScripts) && cmplzArrayIsEmpty(waitingScripts) ) {
      var event = new CustomEvent( 'cmplzRunAfterAllScripts' );
//      document.dispatchEvent(event);
      cmplzAllScriptsHookFired = true;
   }
}

It seems like some js code evaluates twice after accepting cookies.

Any ideas how I can fix this?

Thank you


Viewing all articles
Browse latest Browse all 59525

Trending Articles