artemave / translate_onhover

Browser translation extension
https://chrome.google.com/webstore/detail/aggiiclaiamajehmlfpkjmlbadmkledi
205 stars 61 forks source link

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

Open WofWca opened 4 years ago

WofWca commented 4 years ago

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:

https://github.com/artemave/translate_onhover/blob/12aab5217677b0ba3579106c1200443454c87a16/contentscript.js#L166

joomlafun commented 1 year ago

same on 105 64 bit firefox on ubuntu