Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It does not slide underneath in mobile browser #77

Open
lorenzonet opened this issue Mar 23, 2020 · 4 comments
Open

It does not slide underneath in mobile browser #77

lorenzonet opened this issue Mar 23, 2020 · 4 comments

Comments

@lorenzonet
Copy link

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

CookieConsent and Library Versions?

- cookieconsent version: 3.1.1
- ngx-cookieconsent version: 2.2.3

OS Version?

Windows 10

Angular, Node and al Versions?

Angular CLI: 8.3.8
Node: 12.13.0
OS: win32 x64
Angular: 8.2.10
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.803.8
@angular-devkit/build-angular 0.803.8
@angular-devkit/build-optimizer 0.803.8
@angular-devkit/build-webpack 0.803.8
@angular-devkit/core 8.3.8
@angular-devkit/schematics 8.3.8
@angular/cdk 8.2.3
@angular/cli 8.3.8
@angular/material 8.2.3
@angular/material-moment-adapter 8.2.3
@ngtools/webpack 8.3.8
@schematics/angular 8.3.8
@schematics/update 0.803.8
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2

Repro steps

run the application in mobile

The log given by the failure

cookie

Desired functionality

the box should slide underneath

Mention any other details that might be useful

It does not always happen

@Waniusza
Copy link

Waniusza commented May 5, 2020

Had same annoying issue.

Solved by hiding it once accepted

Added below code in main component

   this.statusChangeSubscription = this.ccService.statusChange$.subscribe(
      (event: NgcStatusChangeEvent) => {
        if (event.status === 'allow') {
          this.cookieService.set(IS_COOKIE_ALLOWED, 'true');
          this.ccService.destroy();
        } else {
          this.cookieService.delete(IS_COOKIE_ALLOWED);
        }
      });
    let isCookieAllowed = this.cookieService.get(IS_COOKIE_ALLOWED);
    if (isCookieAllowed == 'true') {
      this.ccService.destroy();
    }

Note:
there is cookieService imported (ngx-cookie-service in our project)
there is const IS_COOKIE_ALLOWED: string defined whenever you want (defined and exported in cookie.conf.ts in our project)

@casper5822
Copy link

We have the same problem, any update on this problem?

@henning410
Copy link

same problem here. Any fix?

@henning410
Copy link

In your app.module.ts you can use in the cookieConfig as type: info.
This makes the cookie banner dissappear when clicking the button. Not sure if it is what you need, but for me it solves the problem-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants