From fd4059793a7f38ed1fa1b3b43152437c6ffaaea3 Mon Sep 17 00:00:00 2001 From: vladimirze Date: Sat, 13 Oct 2018 15:21:22 +0300 Subject: [PATCH] Remove vendor prefixes from isTabVisible() (#2494) (#2505) `document.hidden` is available on supported browsers. closes #2494 --- src/core.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/core.js b/src/core.js index f903648..3f9b46c 100644 --- a/src/core.js +++ b/src/core.js @@ -1132,18 +1132,7 @@ ChartInternal.prototype.parseDate = function(date) { }; ChartInternal.prototype.isTabVisible = function() { - var hidden; - if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support - hidden = "hidden"; - } else if (typeof document.mozHidden !== "undefined") { - hidden = "mozHidden"; - } else if (typeof document.msHidden !== "undefined") { - hidden = "msHidden"; - } else if (typeof document.webkitHidden !== "undefined") { - hidden = "webkitHidden"; - } - - return document[hidden] ? false : true; + return !document.hidden; }; ChartInternal.prototype.getPathBox = getPathBox;