From db0955305b277b4c8d6066a6c664971c281ce1d9 Mon Sep 17 00:00:00 2001 From: Antonio Laguna Date: Sat, 29 Apr 2017 22:52:33 +0200 Subject: [PATCH] Broadening the utility --- src/js/utils/dom.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/js/utils/dom.js b/src/js/utils/dom.js index 5912b6a..d53015a 100644 --- a/src/js/utils/dom.js +++ b/src/js/utils/dom.js @@ -128,13 +128,12 @@ export default class DOM { } /** - * Checks if the element is visible.This is only intended - * to be used in conjunction with DOM.hide and DOM.show + * Checks if the element is visible. * @param {Element} el Element to check. * @return {boolean} */ static isVisible(el) { - return el.style.display == ''; + return (el.offsetParent !== null); } /**