apertureless / vue-cookie-law

🍪 👮 Hackable EU Cookie Law Plugin for Vue.js
MIT License
378 stars 43 forks source link

Message becomes visible after page refresh and cannot be closed. #77

Open Jardo-51 opened 3 years ago

Jardo-51 commented 3 years ago

vue & vue-cookie-law version

2.6.12, 1.13.3

Steps to reproduce

  1. Open page in incognito mode (fresh browser, cookie message shows)
  2. Close cookie message with Accept button (cookie message hides)
  3. Refresh page (cookie message is visible again and doesn't react to pressing the Accept button)

What is Expected?

Cookie message to remain closed after it has been closed with the Accept button and refreshing the page.

What is actually happening?

As mentioned, after I close the cookie message with the Accept button and refresh the page, the message reappears and cannot be closed anymore.

There are no errors in console. Local storage contains the value cookie:accepted=true. If I delete this value, and refresh the page, the message is shown and I'm able to close it. But if I refresh the page again, the message reappears and cannot be closed.

My code:

<v-footer>
    <cookie-law :message="$t('cookieConsent.message')" :buttonText="$t('cookieConsent.accept')" />
</v-footer>