From cde86680342307fdc0fd20823bc7ee9715a47ab7 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 6 Mar 2017 18:18:58 +0100 Subject: [PATCH] [FIX] web: IE <= 11.0 doesn't support ChildNode.remove IE 11.0 doesn't support `Childnode.remove`: http://caniuse.com/#feat=childnode-remove As a workaround, we use `Node.removeChild`, which is more widely supported. opw-710617 --- addons/web/static/lib/qweb/qweb2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/lib/qweb/qweb2.js b/addons/web/static/lib/qweb/qweb2.js index 1ea73e6278e..1e854a6960c 100644 --- a/addons/web/static/lib/qweb/qweb2.js +++ b/addons/web/static/lib/qweb/qweb2.js @@ -327,7 +327,8 @@ QWeb2.Engine = (function() { if (self.tools.trim(text_node.nodeValue)) { return self.tools.exception("Error: text is not allowed between branching directives"); } - text_node.remove(); + // IE <= 11.0 doesn't support ChildNode.remove + text_node.parentNode.removeChild(text_node); } } else { return self.tools.exception("Error: t-elif and t-else directives must be preceded by a t-if or t-elif directive");