From b319ea20dde639104ca1d33c55014960dfe8faac Mon Sep 17 00:00:00 2001 From: Ben Cai Date: Mon, 30 Sep 2019 10:37:58 -0500 Subject: [PATCH] docs(utils): add code comment in scroll-state for why childNodes is needed for SVGs in IE (#1827) --- lib/core/utils/scroll-state.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/utils/scroll-state.js b/lib/core/utils/scroll-state.js index 3fe7261006..5e11cab6c7 100644 --- a/lib/core/utils/scroll-state.js +++ b/lib/core/utils/scroll-state.js @@ -14,6 +14,7 @@ function setScroll(elm, top, left) { * Create an array scroll positions from descending elements */ function getElmScrollRecursive(root) { + // Need to also get .childNodes since SVGs in IE don't have .children. return Array.from(root.children || root.childNodes || []).reduce( (scrolls, elm) => { const scroll = axe.utils.getScroll(elm);