-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing the handheld footer menu causes js error: Uncaught ReferenceError: storefrontScreenReaderText is not defined #2082
Comments
Hi @mikezielonka, Thanks for creating the issue – much appreciated! 🙏 I followed the documented process, and it's working fine for me. Can you please share the steps to reproduce the issue including how/where you added following lines?
|
I have the same behavior. The footer.min.js is still loading. Look at the source code (right click in browser -> view page source): <script src='/wp-content/themes/storefront/assets/js/footer.min.js?ver=4.2.0' id='storefront-handheld-footer-bar-js'></script> You should also remove the script by wp_dequeue_script('storefront-handheld-footer-bar'); |
Interesting! Thanks @stefpb for the insight. @danielwrobert, I wonder if we should:
Thoughts? |
Agree with both solutions. I specially like 1 because it would keep the snippet simple as-is. In the meanwhile, the solution proposed by @stefpb above, works. I added the Currently the script is enqueued here:
and with the proposed solution it would be enqueued inside this function:
We would need to test that it doesn't cause any regressions, though. |
Hi All! I removed the handheld footer menu using the documented process.
Removing the footer menu then results in a JS error in the browser
navigation.min.js?ver=4.2.0:formatted:24 Uncaught ReferenceError: storefrontScreenReaderText is not defined at navigation.min.js?ver=4.2.0:formatted:24:59 at NodeList.forEach (<anonymous>) at HTMLDocument.<anonymous> (navigation.min.js?ver=4.2.0:formatted:18:48)
The text was updated successfully, but these errors were encountered: