Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Goes to first slide on window resize #45

Open
ralftar opened this issue Jan 22, 2020 · 3 comments
Open

Goes to first slide on window resize #45

ralftar opened this issue Jan 22, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Projects

Comments

@ralftar
Copy link

ralftar commented Jan 22, 2020

Bug.

To reproduce:

  • Open demo
  • Go to the second slide
  • Resize window

Expected behavior:

  • Resizing window should not trigger sliding

Very annoying on mobile devices where the address bar is shown/hidden automatically.

@gbrlsnchs gbrlsnchs self-assigned this Jan 22, 2020
@gbrlsnchs gbrlsnchs added enhancement New feature or request good first issue Good for newcomers labels Jan 22, 2020
@gbrlsnchs gbrlsnchs added this to the Launch stable version milestone Jan 22, 2020
@gbrlsnchs gbrlsnchs added this to To do in Issues via automation Jan 22, 2020
@gbrlsnchs
Copy link
Owner

Since this is done on purpose, it is easily reversible. I'll take a look, thanks for the feedback.

@jovankrunic
Copy link

Great library, but same problem here when triggering full-screen from a slide's content (e.g. when an HTML5 video on a slide needs to be launched in full-screen mode) as this also triggers the "resize" event.

@HostListener('window:resize', ['$event'])

  @HostListener('window:resize', ['$event'])
  public onResize(event: Event): void {
    // Reset carousel when window is resized
    // in order to avoid major glitches.
    this.slideTo(0);
  }

@gbrlsnchs can you please tell me, do these problems still need to be addressed and what kind of problems are they? I would be interested to take a look and submit a PR, if that's ok.

@ralftar
Copy link
Author

ralftar commented May 24, 2020

Can we reverse it, or will it lead to major glitches? Can they be mitigated in other ways?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Issues
  
To do
Development

No branches or pull requests

3 participants