Skip to content

Translation text layer blur large and incorrectly offset from expected position #1457

Description

@schu96

Description

When the translation plugin is active, the blur that covers the original text image is not directly over the text selection layer. This results in an odd period where the blur element is partially off of the page image before it correctly snaps into the right place.

Evidence / Screenshot (if possible)

Image

Expectation

We should expect the blur to be sized and positioned properly over the text.

Context

This behavior has mostly been observed in Chrome and could potentially affect other Chromium based browsers

Proposal & Constraints

It may be best to only show the blur translate layer after models are loaded + after translated text is completed?

Stakeholders

@schu96 @cdrini

Activity

  1. jnakaigen commented on Dec 22, 2025

    @jnakaigen

    Hi @schu96! I’ve noticed this issue regarding the translation text layer blur and would like to help resolve it.

    I am currently setting up the BookReader environment locally to try and reproduce the offset. Since I'm new to the codebase, are there any specific files related to the translation plugin's rendering logic that you'd recommend I look at first?

    Thank you for your time!

  2. rajeevroy21 commented on Dec 24, 2025

    @rajeevroy21

    Hi @schu96,
    I fixed this issue locally by adjusting when the blur is shown. I tested in Chrome, and the blur now stays aligned.

    Happy to open a PR if you’d like.

    Screen.Recording.2025-12-25.004324.mp4
  3. schu96 commented on Jan 12, 2026

    @schu96
    CollaboratorAuthor

    @jnakaigen the bulk of the logic for this plugin can be found in the plugins/translate files, I recommend starting there

    Hi @rajeevroy21 thanks but the intended behavior would be to preserve the translated paragraph background showing over the original text even if the translation is not completed. The cause of this specific issue has been identified, please feel free to check out another issue and submit a PR with a screen recording / screenshot of the fixed behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions