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

[Regression] The getVisibleElements helper function is broken in RTL-locales #12453

Closed
Snuffleupagus opened this issue Oct 7, 2020 · 0 comments · Fixed by #12464
Closed

[Regression] The getVisibleElements helper function is broken in RTL-locales #12453

Snuffleupagus opened this issue Oct 7, 2020 · 0 comments · Fixed by #12464

Comments

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Oct 7, 2020

Attach (recommended) or Link to PDF file here: Not applicable

Configuration:

  • Web browser and its version: All
  • Operating system and its version: All
  • PDF.js version: All versions since 2.0.943, including the current master.
  • Is a browser extension: Not applicable

Steps to reproduce the problem:

  1. Open http://localhost:8888/web/viewer.html#locale=he (or another RTL-locale)
  2. Choose "Horizontal Scrolling"-mode in the Secondary Toolbar
  3. Scroll to the end of the document.

What is the expected behavior? (add screenshot)
All pages, including the last one, should render successfully.

What went wrong? (add screenshot)
All pages, except the first ones, are completely blank.


The bug is, as far as I can tell, caused by the getVisibleElements helper function not handling the viewer being used in RTL-locales (i.e. when dir="rtl" is set on the containing HTML-element).

While this very clearly effects the "Horizontal Scrolling"-mode, it's also possible that both the "Wrapped Scrolling"-mode and the "Odd/Even Spread"-modes are also affected (but to a lesser extent) in RLT-locales.


I'd tentatively suggest that we label this as a regression, since it appears to have been broken in RTL-locales ever since PR #9208 which originally added the "Horizontal Scrolling"-mode (and others).

@Snuffleupagus Snuffleupagus changed the title [Regression] The getVisibleElements helper function is broken when the viewer is in RTL-locales [Regression] The getVisibleElements helper function is broken in RTL-locales Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants