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

EPUB text selection sometime breaks in paginated mode #325

Closed
mickael-menu opened this issue Jan 13, 2023 · 5 comments · Fixed by #502
Closed

EPUB text selection sometime breaks in paginated mode #325

mickael-menu opened this issue Jan 13, 2023 · 5 comments · Fixed by #502
Labels
blocked external Issue blocked by a third-party dependency bug Something isn't working

Comments

@mickael-menu
Copy link
Member

Bug Report

What happened?

On recent Android versions, the viewport sometime shifts when attempting to move the text selection handle.

selection1.mov

How to reproduce?

  1. Open an EPUB on a recent version of Android (tested with API 33).
  2. Enable paginated mode.
  3. Increase the font size.
  4. Go to the second page of a chapter.
  5. Long press a word at the top of the page.
  6. Drag down the right text selection handle.
  7. The selection will shift to the previous page.

This is not very reliable and can be hard to reproduce.

Environment

  • Readium version: 2.3.0

Testing device

  • Android version: API 33
  • Model: Pixel 5
  • Is it an emulator? Yes

Additional context

I believe it's a bug related to the CSS columns in the Chrome Web View. I reproduced the bug in a sample project with a chapter modified to use CSS columns:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"/>
<style>
html {
    column-width: 20em;
    height: 100vh;
}
</style>

Result is the same:

selection2.mov

Here's the test project: TestWebView.zip

@mickael-menu
Copy link
Member Author

Android bug report opened: https://issuetracker.google.com/issues/265334518

@mickael-menu
Copy link
Member Author

@mickael-menu
Copy link
Member Author

The Android issue was transferred to the Chromium bug tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=1410341

@mickael-menu
Copy link
Member Author

A potential workaround here: futurepress/epub.js#1366 (comment)

@mickael-menu
Copy link
Member Author

It was a dead-end, but it inspired me a different solution: #502

@mickael-menu mickael-menu linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked external Issue blocked by a third-party dependency bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant