Skip to content

🐞 Bug Report: Selection from Chrome causes spaces to be lost #1156

@coppit

Description

@coppit

Please confirm the following:

  • Be sure to check out FAQ
  • I have carefully read the README
  • I have searched through the issues page but couldn't find a solution.(Including issue that has been closed)
  • Easydict has been upgraded to the latest version
  • I understand and agree to the above, and understand that the project maintainer has limited energy, issues that do not follow the rules may be ignored or closed directly

Problem description

Stories on aliceayel.com have a feature where if you click on the word, a dictionary entry pops up. I think this feature is causing problems with Chrome. Firefox works fine. The selection is transferred to EasyDict, but almost all of the spaces are removed.

Is the issue consistently reproducible?

Reproducible

Steps to Reproduce

I've created a repro that works in Firefox, but fails in Chrome:

<html>
<head>
    <meta charset="UTF-8">
    <style>
        /* This is the essential part that causes the bug */
        w {
            display: inline-block;
            position: relative;
        }
    </style>
</head>
<body>
    <p>
        <w>dont</w> <w>une</w> <w>ménagère</w>
    </p>
</body>
</html>
  1. Load this HTML into Chrome on Mac
  2. Select the "dont une ménagère" text
  3. Choose "select translate" in the EasyDict menu
  4. Observe that the input text is missing spaces.

Screenshot

Image

Runtime log(zip file)

Easydict log 2026-04-25 10-55-14-756.zip

Expected result

Image

Proposed solution (optional)

No response

Device type and OS version

Apple M1 Pro, OS X 26.3.1, Chrome 146.0.7680.178

Are you willing to submit a PR to fix this issue?

  • I'm willing to submit a PR to fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions