From 15d6735bd1cd29b7ec581d09e4b1421229138d0f Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 12 Oct 2016 10:15:39 +0200 Subject: [PATCH] Fixed table head being removed --- .../system/html/input/node/HtmlInputNodeTable.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTable.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTable.class.php index d63617aa90..1587505c16 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTable.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTable.class.php @@ -41,7 +41,12 @@ class HtmlInputNodeTable extends AbstractHtmlInputNode { // check if each `` has at least one `` foreach ($trs as $tr) { - if ($tr->getElementsByTagName('td')->length === 0) { + $childTagName = 'td'; + if ($tr->parentNode->nodeName === 'thead') { + $childTagName = 'th'; + } + + if ($tr->getElementsByTagName($childTagName)->length === 0) { DOMUtil::removeNode($tr); } } -- 2.20.1