Skip to content
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

[Bug]: Background entry animation ignored #697

Open
Massi-X opened this issue Jun 17, 2024 · 1 comment · May be fixed by #698
Open

[Bug]: Background entry animation ignored #697

Massi-X opened this issue Jun 17, 2024 · 1 comment · May be fixed by #698
Labels
bug Something isn't working triage yet to be reviewed

Comments

@Massi-X
Copy link

Massi-X commented Jun 17, 2024

Expected Behavior

The background of . cm-wrapper should animate

Current Behavior

The background of . cm-wrapper does not animate

Steps to reproduce

Hi and thank you for this awesome module! I found a strange bug regarding the background of the main consent window. You can test this even on playground.

  1. First check "Disable page interaction" so that the background is effectively there
  2. You can instantly notice how the background is animated (to test again, close the popup and click on "Flip buttons" or anything else)
  3. Now open your console and type CookieConsent.show() (with no argument or true/false, doesn't matter)
  4. You can now see the background fails to animate

From a first sight I didn't catch anything wrong in the code, but I will check further later, do you already have any ideas maybe?

Proposed fix or additional info.

No response

Version

3.0.1

On which browser do you see the issue?

Chrome/Firefox

@Massi-X Massi-X added the bug Something isn't working label Jun 17, 2024
@github-actions github-actions bot added the triage yet to be reviewed label Jun 17, 2024
@Massi-X Massi-X linked a pull request Jun 18, 2024 that will close this issue
@Massi-X
Copy link
Author

Massi-X commented Jun 18, 2024

OK, found the issue!
When creating the modal in line

setTimeout(() => addClass(dom._cmContainer, 'cc--anim'), 100);
the .cc--anim class is correctly added after a timeout of 100ms, while on show there is no such timeout cause the class is never removed.

See #698 for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage yet to be reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant