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

Search jumps the page in IE #7269

Closed
sharanmunyal opened this issue Apr 28, 2016 · 2 comments
Closed

Search jumps the page in IE #7269

sharanmunyal opened this issue Apr 28, 2016 · 2 comments
Labels

Comments

@sharanmunyal
Copy link

Link to PDF file (or attach file here):
http://mozilla.github.io/pdf.js/web/viewer.html

Configuration:

  • Web browser and its version: IE11
  • Operating system and its version: Windows 7
  • PDF.js version: 1.5.214
  • Is an extension: No

Steps to reproduce the problem:

  1. Search for 'the' in the link provided above.
  2. Do next repeatedly and you should see the page jumping up before it shows the highligted result

What is the expected behavior? (add screenshot)
It should not jump like other browsers (Chrome, Firefox and Safari)

What went wrong? (add screenshot)
Page jumps when you scroll

@Snuffleupagus
Copy link
Collaborator

What is the expected behavior? (add screenshot)
It should not jump like other browsers (Chrome, Firefox and Safari)

What went wrong? (add screenshot)
Page jumps when you scroll

This effect is actually, technically, present in all browsers, it's just that with the usual exception of IE 11 every other browser is fast enough that it's completely imperceivable. The explanation is that the current page is always being re-scrolled into view, when a match has been found, regardless if it's necessary or not; see

if (this._scrollMatches && this._selected.pageIdx === index) {
// If the page is selected, scroll the page into view, which triggers
// rendering the page, which adds the text layer. Once the text layer
// is built, it will attempt to scroll the selected match into view.
this._linkService.page = index + 1;
}

Most likely this issue could be somewhat easily fixed, perhaps along these lines, but I'm just not sure if you want to bother with it!?

@timvandermeij
Copy link
Contributor

I would say we close this as won't-fix since it's not really a problem in modern browsers.

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

No branches or pull requests

4 participants