-
A quick headsup.
Tracked the issue down to theFooter Scripts
in GP Elements.
TheDOMContentLoaded
event listener is being called on each preview load, as each preview is an actual front end render. And for some reason Chrome has a ( bigger ) issue with that.
We will take a look at what we can do to prevent this in the preview, although i am not sure what yet.Will keep you updated.
In the meantime , the Element you could set the USER Display Rules to
Logged Out
, it won’t fire then in the admin ( or on the front end for logged in users ). -
plpapeman
Understood. Thanks.
If you can think of any script alternatives, let me know.
-
David
You’re code just needs to conditional checks, try this:
document.addEventListener('DOMContentLoaded', function() { var closeButton = document.querySelector('.plp-footer-alert-close-button'); var banner = document.querySelector('.plp-footer-alert'); // Check if sessionStorage has the 'bannerHidden' key and if its value is 'true' if ( banner && sessionStorage.getItem('bannerHidden') === 'true') { banner.classList.add('plp-footer-alert-close'); } if ( closeButton ) { closeButton.addEventListener('click', function(event) { event.preventDefault(); // Prevent the default link click action banner.classList.add('plp-footer-alert-close'); sessionStorage.setItem('bannerHidden', 'true'); }); } });
It simply checks that the queried objects are found before it tries to add the event listeners
-
plpapeman
Nice. Much appreciated.
-
David
With that new script you should notice an improvement in the pattern library with the current release version of GB.
Thank you for sharing the server login, as this issue has helped us to identify other areas for improvement, which we will be pushing out at a later date.
So thanks again, we no longer need the login.
-
Philip Gledhill
“Patch for the chrome loading issue.”
I use a Windows 10 local host using XAMPP and Microsoft Edge.
All software is up to date.Only the first few patterns loaded in any tab, but the patch worked for me.
Thank you.
- You must be logged in to reply to this topic.