Skip to content

EPUB text selection sometime breaks in paginated mode #325

@mickael-menu

Description

@mickael-menu

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions