Closed skywarth closed 1 year ago
Hi, thanks for you contribution, but don't really understand your explanation, as it works with the current code without any problems on the demo site: https://shaack.com/projekte/bootstrap-cookie-consent-settings/examples/cookie-banner-example.html What is the difference to your version?
Today while I was implementing this package into some project, I ran into some problem. Occasionally the modal won't load at all with no errors present in console. It would just display half-transparent black overlay background but the modal is not displayed at all. Upon close inspection, I noticed modal content is not loaded neither. But to my surprise, no errors/exceptions present.
Here's the steps I attempted to resolve the issue:
.showDialog()
function inside$( document ).ready(function() {})
(✖).showDialog()
function 2 seconds after the page loads, manually through console. (:heavy_check_mark: )fetchContent
function whereas it loads the corresponding lang file json inasync
fashion. As soon as I changed the third parameter tofalse
, it ran smoothly and without any problem. (:heavy_check_mark: )sync
Third parameter on
XMLHttpRequest.open
is for async XHR request.An alternative approach to load language config directly from a js variable would be efficient IMO.