Multiple click event handlers bound to withdraw tab

Created on 18 July 2024, 5 months ago

Problem/Motivation

When using the withdraw button a click handler is bound to .eu-cookie-withdraw-tab everytime the button is pressed. When the animation time is set to 0 the banner cannot be opened, because the toggleWithdrawBanner function is called twice and closes the banner immediately.

Steps to reproduce

  • Use following settings:
    method: 'opt_in'
    withdraw_enabled: true
    settings_tab_enabled: true
    popup_delay: 0
  • Click "No, thanks"
  • Click "Privacy settings"
  • Look at events on .eu-cookie-withdraw-tab:
    jQuery._data( jQuery(".eu-cookie-withdraw-tab")[0], "events" );
    Object { click: (2) […] }

Proposed resolution

Do not bind the click handler in declineAction.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany hosterholz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024