Problem/Motivation

Withdraw consent tab opens nicely, but doesnt close back.

Comments

aubergine2010 created an issue. See original summary.

aubergine2010’s picture

Solution:

Edit eu_cookie_compliance.js and remove lines 202~205 and add the below line instead:
var $bannerIsShowing = Drupal.settings.eu_cookie_compliance.popup_position ? parseInt($wrapper.css('top')) === (!Drupal.settings.eu_cookie_compliance.fixed_top_position ? -(parseInt($(Drupal.settings.eu_cookie_compliance.containing_element).css('padding-top')) + parseInt($(Drupal.settings.eu_cookie_compliance.containing_element).css('margin-top'))) : 0) : parseInt($wrapper.css('bottom')) === 0;

svenryen’s picture

Thanks for the report. We had some issues with the feature "Do not show policy on click" which is what prompted the insertion of the lines you suggest removing. Can you double check that we don't break the banner's ability to show when that option has been selected?

Could you also for the record run `drush vget eu_cookie_compliance`? I'm trying to understand what features you have enabled.

abaier’s picture

Noticed the same with the latest 8.x-version.

svenryen’s picture

Here are patches. Can you try it out and see if the patch resolves your issue?

I had to use a slightly different approach than the code change you recommended, but it should work.

abaier’s picture

Thanks @svenryen, the d8 patch works for me.

  • svenryen committed ec341a1 on 7.x-1.x
    Issue #3176804 by svenryen, aubergine2010, ABaier: Withdraw consent tab...

  • svenryen committed 0d26178 on 8.x-1.x
    Issue #3176804 by svenryen, aubergine2010, ABaier: Withdraw consent tab...
svenryen’s picture

Status: Needs review » Fixed

Thanks for the RTBC!

aubergine2010’s picture

patch works for d7

  • svenryen committed d6464b0 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
      Issue #3178091 by...
  • svenryen committed ec341a1 on 7.x-2.x
    Issue #3176804 by svenryen, aubergine2010, ABaier: Withdraw consent tab...

Status: Fixed » Closed (fixed)

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