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

The extension causes website's elements' text to get duplicated sometimes #56

Open
WofWca opened this issue May 22, 2020 · 1 comment
Open

Comments

@WofWca
Copy link
Contributor

WofWca commented May 22, 2020

Reproduction:

  1. Enable click-to-translate in the extension options
  2. Go to a SPA website. (e.g. https://popper.js.org/docs/v2/, https://youtube.com)
  3. Click some text element (e.g. a paragraph, a header) (page header, "Documentation" in our example).
  4. Navigate somewhere, but so that that element remains on the destination page (the same page, "v2.x" in our example. Just click on the active link again).

image
image

The clicked element's text is duplicated. Can be repeated.

Environment

Chrome 81.0.4044.138 x64
Win 10

Additional info

I'm sure it's this extension, I've disabled every other one.

On https://youtube.com, you can go to any video, then click its title, then go to any other video in the right column.

Another small reproduction example:

  1. Enable point-to-translate.
  2. Go to https://popper.js.org/docs/v2/tutorial/#functionality
  3. Hover over the My Button text, wait for the translation popup to appear.
  4. Hover off the button.
    image

Also works with point-to-translate. Just wait for the translation popup to appear, then click.

I see there's some funky markup manipulation stuff going, I think we need to look in this function:

function getHitWord(e) {

@joomlafun
Copy link

same on 105 64 bit firefox on ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants