Skip to content

Accept buttons not working on first click #47

@nlukic97

Description

@nlukic97

I have noticed scenarious where clicking on "Accept all" or "Accept essentials" will not work (popup box remains open). In such cases, users have to click a second time for the popup box to close.

This issue was the placement of @cookieconsentscripts - if there are other script tags of a larger size above it, the cookie box will open without the actual laravel-cookie-consent javascript being loaded, so clicking on it will throw an undefined error:

image

The solution is to move @cookieconsentscripts above all other script tags to ensure it loads first.

However, I would suggest displaying the popup box after the event DOMContentLoaded is fired

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions