Expected behavior
Cookie banner functionaly and event handlers should be hooked after after the DOM is present.
Current Behavior
Cookie Banner is not functional and event handlers are not hooked.
Steps to reproduce
A lot of JS
enable script merging
open the page
Click on "Accept" on the banner
nothing happens, no cookie is set, cookie banner not disappearing
Environment
wacon_cookie_management version(s): 3.4.0
TYPO3 version(s): 11.5.19
PHP version(s): 7.4
Is your TYPO3 installation set up with Composer (Composer Mode): no
~30 active plugins
Possible Solution
Move all event handlers into the $(document.ready) in waconcookiemanagement.js to make sure, the cookiebox is in the DOM when event handlers are hooked.
Additional context
This probably happens because the event handlers are added as soon as the file is executed. In our case, this happens before the DOM is fully loaded, so all eventhandlers are not applied since the classes are not set at execution time.
This is probably not the case on every webpage where this plugin is active. Nevertheless, is there any advice how we could solve this problem without the need of modifying plugin files directly, after every update?
Bug Report
Expected behavior Cookie banner functionaly and event handlers should be hooked after after the DOM is present.
Current Behavior Cookie Banner is not functional and event handlers are not hooked.
Steps to reproduce
Environment
Possible Solution Move all event handlers into the $(document.ready) in waconcookiemanagement.js to make sure, the cookiebox is in the DOM when event handlers are hooked.
Additional context This probably happens because the event handlers are added as soon as the file is executed. In our case, this happens before the DOM is fully loaded, so all eventhandlers are not applied since the classes are not set at execution time.
This is probably not the case on every webpage where this plugin is active. Nevertheless, is there any advice how we could solve this problem without the need of modifying plugin files directly, after every update?
Thank you for any answers!