cookieconsent icon indicating copy to clipboard operation
cookieconsent copied to clipboard

[Bug]: Hiding the setting modal window and re-displaying it will set all user settings to false, but our default is true.

Open ni00 opened this issue 1 year ago • 1 comments

Expected Behavior

re-displaying it set all user settings to default image image

Current Behavior

re-displaying it set all user settings to false

Steps to reproduce

  1. Set default user configuration as true
  2. Correctly display settings modal window upon first opening
  3. Hide modal window (by clicking close or outside the modal window)
  4. Open modal window again.

Proposed fix or additional info.

Delete the discardUnsavedToggles method or add an optional configuration item to enable or disable it.

Version

2.9.1

On which browser do you see the issue?

Chrome

ni00 avatar May 31 '23 01:05 ni00

This is an intentional change introduced in the last release: https://github.com/orestbida/cookieconsent/issues/481

The toggle.enabled option actually doesn't enable the category itself (although the toggle is marked as enabled) as it's supposed to work only when mode: "opt-out".

I will release an update that actually ignores the toggle.enabled option, unless mode is set to "opt-out".

orestbida avatar Jun 03 '23 23:06 orestbida