From 29ef0c1a2bf87d41d5d5a7be2b9860550c9af8cc Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Mon, 27 Jan 2020 21:32:36 +0200 Subject: [PATCH] fix: issue #253 (#267) --- lib/timeline/component/item/BoxItem.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/timeline/component/item/BoxItem.js b/lib/timeline/component/item/BoxItem.js index 4127286d7b..519ddc3e45 100644 --- a/lib/timeline/component/item/BoxItem.js +++ b/lib/timeline/component/item/BoxItem.js @@ -271,9 +271,14 @@ class BoxItem extends Item { if (this.displayed) { const dom = this.dom; - if (dom.box.parentNode) dom.box.remove(); - if (dom.line.parentNode) dom.line.remove(); - if (dom.dot.parentNode) dom.dot.remove(); + if (dom.box.remove) dom.box.remove(); + else if (dom.box.parentNode) dom.box.parentNode.removeChild(dom.box); // IE11 + + if (dom.line.remove) dom.line.remove(); + else if (dom.line.parentNode) dom.line.parentNode.removeChild(dom.line); // IE11 + + if (dom.dot.remove) dom.dot.remove(); + else if (dom.dot.parentNode) dom.dot.parentNode.removeChild(dom.dot); // IE11 this.displayed = false; }