The hide animation when you click on the decline button is hard-coded to a bottom position. If you put the popup slider on top, the hide animation tries to animate it incorrectly. Especially if you use custom theming this can be a problem.

see eu_cookie_compliance.js line 256:

Drupal.eu_cookie_compliance.declineAction = function () {
    Drupal.eu_cookie_compliance.setStatus(0);
    $('#sliding-popup').animate({ bottom: $('#sliding-popup').outerHeight() * -1 }).trigger('eu_cookie_compliance_popup_close');
  };

It says bottom, whereas it should check if (Drupal.settings.eu_cookie_compliance.popup_position) {}.

Comments

basvredeling created an issue. See original summary.

basvredeling’s picture

Status: Active » Needs review
StatusFileSize
new894 bytes

simple patch

svenryen’s picture

Status: Needs review » Needs work
  1. +++ b/eu_cookie_compliance/js/eu_cookie_compliance.js
    @@ -255,7 +255,13 @@
    +      popup.animate({ top: popup.outerHeight() * -1 }).trigger('eu_cookie_compliance_popup_close');
    

    Here you write "top"

  2. +++ b/eu_cookie_compliance/js/eu_cookie_compliance.js
    @@ -255,7 +255,13 @@
    +      popup.animate({ top: popup.outerHeight() * -1 }).trigger('eu_cookie_compliance_popup_close');
    

    Here you also write "top". Should one of them be "bottom"?

basvredeling’s picture

Status: Needs work » Needs review
StatusFileSize
new813 bytes

Here you also write "top". Should one of them be "bottom"?

Sloppy of me... here's a new patch.

basvredeling’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Changed branch to 7.x-1.x-dev

basvredeling’s picture

@svenryen please review #4

svenryen’s picture

Getting to it.. There's a lot in the pipeline though, so please be a bit patient.

  • svenryen committed b4049cf on 8.x-1.x authored by basvredeling
    Issue #2975085 by basvredeling: JS hide animation doesn't respect popup...

  • svenryen committed 3e9f193 on 7.x-1.x authored by basvredeling
    Issue #2975085 by basvredeling: JS hide animation doesn't respect popup...
svenryen’s picture

Status: Needs review » Fixed

Fixed. Thanks!

basvredeling’s picture

Thank you @svenryen

  • svenryen committed 3e9f193 on 7.x-2.x authored by basvredeling
    Issue #2975085 by basvredeling: JS hide animation doesn't respect popup...
  • svenryen committed 884a355 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
    Issue #2975382 by...

Status: Fixed » Closed (fixed)

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