diff --git a/frontend/src/metabase/visualizations/components/ChartTooltip.jsx b/frontend/src/metabase/visualizations/components/ChartTooltip.jsx
index 1ae8db4206716673f3149cbae3981b3502420131..52814ec3a7680f25a4e4b5c77f478f3584f13157 100644
--- a/frontend/src/metabase/visualizations/components/ChartTooltip.jsx
+++ b/frontend/src/metabase/visualizations/components/ChartTooltip.jsx
@@ -43,7 +43,7 @@ export default class ChartTooltip extends Component {
     const rows = this._getRows();
     const hasEventOrElement =
       hovered &&
-      ((hovered.element && document.contains(hovered.element)) ||
+      ((hovered.element && document.body.contains(hovered.element)) ||
         hovered.event);
     const isOpen = rows.length > 0 && !!hasEventOrElement;
     return (
diff --git a/frontend/src/metabase/visualizations/lib/LineAreaBarPostRender.js b/frontend/src/metabase/visualizations/lib/LineAreaBarPostRender.js
index 43bf5d2d083f383ef287e91baaefcef025df03f9..0a8a7da4a0fb60065fef0e2298bc2a0a974db607 100644
--- a/frontend/src/metabase/visualizations/lib/LineAreaBarPostRender.js
+++ b/frontend/src/metabase/visualizations/lib/LineAreaBarPostRender.js
@@ -97,7 +97,7 @@ const DOT_OVERLAP_RATIO = 0.1;
 const DOT_OVERLAP_DISTANCE = 8;
 
 function onRenderSetLineWidth(chart) {
-  const dots = chart.svg()[0][0].getElementsByClassName("dot");
+  const dots = chart.svg()[0][0].querySelectorAll(".dot");
   if (dots.length < MAX_DOTS_FOR_LINE_WIDTH_ADJUSTMENT) {
     const min = getMinElementSpacing(dots);
     if (min > 150) {
diff --git a/resources/frontend_client/index_template.html b/resources/frontend_client/index_template.html
index 18e68fa362c90450900a21213985b844e5f498c5..817b9e55f812a99d390e43043613efb842004e80 100644
--- a/resources/frontend_client/index_template.html
+++ b/resources/frontend_client/index_template.html
@@ -40,7 +40,7 @@
   <body>
     <div id="root"></div>
 
-    <!-- Using the Web Font Loader lets us load the fonts asynchronously for faster page loads -- see https://github.com/typekit/webfontloader -->
+    <!-- Using the Web Font Loader lets us load the fonts asynchronously for faster page loads – see https://github.com/typekit/webfontloader -->
     <!-- If you modify this script, make sure you update the whitelisted Content-Security-Policy hash in metabase.middleware.security -->
     <script type="text/javascript">{{{webFontConfigJS}}}</script>
     <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" async></script>