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.

CommentFileSizeAuthor
#6 3462240-5.patch67.69 KBlmoeni
#4 3462240-4.patch67.44 KBhosterholz
#3 3462240-3.patch66.16 KBhosterholz
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hosterholz created an issue. See original summary.

hosterholz’s picture

StatusFileSize
new66.16 KB

Patch for 1.24

hosterholz’s picture

StatusFileSize
new67.44 KB

Patch for 1.25

lmoeni made their first commit to this issue’s fork.

lmoeni’s picture

StatusFileSize
new67.69 KB

I rebased the merge request and created a new patch for 1.26.

lmoeni’s picture

Status: Active » Needs review
atowl’s picture

Hi @lmoeni

Is MR141 good to go here?

lmoeni’s picture

Hi @atowl
Yes it should be good to go.

atowl’s picture

Thanks everyone for your help on this issue,

I've merged this in, will be available in the next release shortly

  • atowl committed 2bab1cc7 on 8.x-1.x authored by hosterholz
    Issue #3462240 by hosterholz, lmoeni: Multiple click event handlers...
atowl’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.