Highcharts always console error ablout bubble_compiled.js?

I am writing a pie chart in my application
But always with the error bubble_compiled.js
when I click the pie it has no animation and it shows Uncaught TypeError: a.target.className.indexOf is not a function Why?

+6
source share
1 answer

I got the same error when clicking on my D3 charts.

bubble_compiled.js is part of the Google Translate Chrome Extension . Disabling / removing this extension will cause the error to disappear, but this error should not affect your site at all.

This error occurs because the extension has a mousedown listener that is trying to check whether the target element has the class "jfk-bubble-closebtn".

Relevant code in the extension ( full source here ):

 P(window, "mousedown", function(a) { var b = Ub(document, "gtx-trans"); b && (ec(b, a.target) ? a.preventDefault() : (Tc(b), dc(b))); -1 != a.target.className.indexOf("jfk-bubble-closebtn") && a.preventDefault() } 

Since you are using Highcharts, you can click on the SVG element. The SVG class name type is SVGAnimatedString , which unlike String does not have an indexOf method. Therefore, when an extension tries to call it, it fails because it does not exist.

See also: Chrome and TypeError due to SVGAnimatedString

+23
source

Source: https://habr.com/ru/post/988064/


All Articles