Translate broken with SVG when accessing .className
Reported by
s...@selz.com,
Mar 20 2018
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.33 Safari/537.36 Example URL: https://cdn.selzstatic.com/tmp/google-translate-test.html Steps to reproduce the problem: 1. Go to above URL with example <svg> with title attribute 2. Right click in the body and click "Translate to English" 3. Observe JavaScript error in the dev tools console which breaks other JavaScript execution What is the expected behavior? No JavaScript error What went wrong? Through some debugging I found the Google Translate JavaScript is looking for .className which with an SVG will return an SVGAnimatedString and not a real String. You need to use .getAttribute('class') instead. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 66.0.3359.33 Channel: beta OS Version: OS X 10.13.4 Flash Version:
,
Mar 20 2018
,
Mar 21 2018
,
Mar 21 2018
Can't repro this. When I go to the example site, Translate works as intended. Tried this in Canary on 66 and on stable in 65, both on Mac.
,
Mar 21 2018
Yes, the translation works. It also breaks JavaScript execution due to the error in the console. Here you go: https://www.dropbox.com/s/mkbnrzqyaoeywr4/Kapture%202018-03-21%20at%2015.35.10.mp4?dl=0
,
Mar 21 2018
,
Nov 6
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by krajshree@chromium.org
, Mar 20 2018