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

Second pdf loaded not navigate on the second page with [show-all]="false" #947

Closed
QuentinChaumont opened this issue Nov 21, 2022 · 1 comment · Fixed by #948
Closed

Second pdf loaded not navigate on the second page with [show-all]="false" #947

QuentinChaumont opened this issue Nov 21, 2022 · 1 comment · Fixed by #948
Milestone

Comments

@QuentinChaumont
Copy link
Contributor

QuentinChaumont commented Nov 21, 2022

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

Hi,
First of all thanks for the great work on this.

Context :

I am using pdf-viewer with option "show-all"= false and use option "page" to navigate through my pdf.

Description of the issue :

  • I load my first pdf with 2 pages.
  • I navigate to page 2 successfully.
  • I load a second pdf with 2 pages.
  • When I try to navigate to page 2 nothing happen I stay stuck on page 1.

Explaination

When I load the new pdf, this._latestScrolledPage is not cleared and stay at 2. So it'is not possible to render page 2 because of the condition : if (page.currentValue === this._latestScrolledPage) { return; } into method ngOnChanges() on page change condition.

Tested Solution
Reset this value on clear() method (called when new pdf is loaded) : this._latestScrolledPage = 0;

QuentinChaumont added a commit to QuentinChaumont/ng2-pdf-viewer that referenced this issue Nov 21, 2022
QuentinChaumont added a commit to QuentinChaumont/ng2-pdf-viewer that referenced this issue Nov 21, 2022
@VadimDez VadimDez linked a pull request Nov 21, 2022 that will close this issue
@VadimDez VadimDez added this to the 9.1.3 milestone Nov 21, 2022
VadimDez added a commit that referenced this issue Nov 21, 2022
fix #947 : reset this._latestScrolledPage on clear method
@QuentinChaumont
Copy link
Contributor Author

Hi ! Sorry to disturb you. When do you plan to release milestone 9.1.3 ?

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

Successfully merging a pull request may close this issue.

2 participants