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

In 2 pages mode, the second page may not show up entirely #37

Open
danielweck opened this issue Jul 8, 2014 · 6 comments
Open

In 2 pages mode, the second page may not show up entirely #37

danielweck opened this issue Jul 8, 2014 · 6 comments

Comments

@danielweck
Copy link
Member

Originally posted by
@edas
at
readium/readium-js#49

readium

See screenshot (in the right page : lack of a few characters on end of line, and lack of the blue right border of the "note"). Both reproduceable in Firefox and Chrome, both in master and in develop branches. This example is with the file "accessible epub 3" from readium-js-viewer.

When resizing little step per little step, it is easy to find a step where the second column is truncated of a few pixels.

In my example, here a few metrics :

  • #reflowable-content-frame (<div> surrounding the <iframe>) is of 766.5 pixels
  • iframe is of 767 pixels
  • inner html document is 767 pixels with 353px columns and 60px gap

The total (2 columns + gap) should fit in the iframe, but does not.

<p>in the columns have 353.5px (and not 353px) however there are more than 1 pixel missing at right so I doubt this rounding error is the root problem.

However, the <aside> surrounded by a blue border has 335.5px widht + 2_8px padding + 2_1px border. This may have to be investigated as a potential cause of the problem.

@danielweck
Copy link
Member Author

I am able to reproduce this (Chrome OSX, Readium "cloud reader" and Chrome extension).

In my test case, each column is one pixel wider than it should be. This imprecision accumulates to several pixels by the time Readium "scrolls" to the correct column (HTML left relative positioning).

This is a browser issue, I am not sure how we can solve it. A possible workaround would be to assume a larger column width by default ("rounding up"), but this would have an adverse effect when scrolling to columns that have the correct size!

I also noticed that the "pre" code fragments are truncated as they overflow pass the column boundary. Again, I don't think we can do much to fix this, unless we stop using CSS columns to emulate pagination (which would be good, as there are other problems with columnization, such as unplayable videos in WebViews! Unfortunately, the "proper" W3C pagination feature isn't widely supported, and it has its own caveats anyway).
I'm keeping this issue open, but with low priority.

@danielweck
Copy link
Member Author

Ah, this seems to have fixed it (rounding error mitigation):
da248db

As described in the comment above, the "pre" code fragments still overflow pass the column boundaries, but that is a no-fix.

@jccr jccr reopened this Aug 6, 2015
@jccr
Copy link
Member

jccr commented Aug 6, 2015

I still notice this issue in the latest develop:

It appears the left side gets cut off now:

screen shot 2015-08-06 at 2 04 56 pm

This only happens if the viewport has an odd numbered width:

For example in my screenshot I'm using 1281x800
If I use 1280x800 or 1282x800 the issue doesn't appear..

@jccr
Copy link
Member

jccr commented Aug 6, 2015

One solution would be to always force the width we set to be even numbered.

@jccr jccr added bug and removed enhancement labels Aug 6, 2015
@jccr
Copy link
Member

jccr commented Aug 6, 2015

This bug appears in pretty much any browser. I've seen it in iOS, OSX, Firefox, Chrome, Safari.

jccr pushed a commit that referenced this issue Aug 7, 2015
Fixes regression (?) of #37. Pages were being cut off from the left side in 2 page mode.
jccr pushed a commit that referenced this issue Aug 7, 2015
Fixes regression (?) of #37. Pages were being cut off from the left side in 2 page mode.
@danielweck
Copy link
Member Author

Duplicate of #181 ?
If so, does #200 fix this as well?

jccr added a commit that referenced this issue Apr 7, 2016
Fixes regression (?) of #37. Pages were being cut off from the left side in 2 page mode.
@rkwright rkwright added func:Layout and removed bug labels May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants