From 06823567e0e690d0910ba30655a9f4fd99459eb1 Mon Sep 17 00:00:00 2001 From: Vu Duong Date: Thu, 8 Oct 2020 15:11:53 +0200 Subject: [PATCH] fix internet explorer 11 issue with svg nodes checking for classList --- src/columnresizing.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/columnresizing.js b/src/columnresizing.js index af6cb5dd..5331305e 100644 --- a/src/columnresizing.js +++ b/src/columnresizing.js @@ -141,8 +141,11 @@ function currentColWidth(view, cellPos, {colspan, colwidth}) { return domWidth / parts } +// ie fix: classList property does not exist on svgs in internet explorer. therefore +// we have to check the classList property first before calling the contains function +// on the classList function domCellAround(target) { - while (target && target.nodeName != "TD" && target.nodeName != "TH") + while (target && target.classList && target.nodeName != "TD" && target.nodeName != "TH") target = target.classList.contains("ProseMirror") ? null : target.parentNode return target }