Introduction
Introduction Statistics Contact Development Disclaimer Help
fix for Firefox: hide empty tbody - jscancer - Javascript crap (relatively smal…
git clone git://git.codemadness.org/jscancer
Log
Files
Refs
README
LICENSE
---
commit 9b8f9db8eb2c2a9a299ac2cf943453f2d198cbf5
parent 2932500f1d5f978262bb31afde0ea85543f641ce
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 3 Aug 2017 19:00:03 +0200
fix for Firefox: hide empty tbody
when a tfoot is used, but the tbody has no visible elements then the
table rendering was weird in Firefox.
Diffstat:
M datatable/datatable.js | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/datatable/datatable.js b/datatable/datatable.js
@@ -107,6 +107,8 @@ function datatable_init(el) {
for (var i = start, prev = startfiller, p = bodytbody;…
prev = p.insertBefore(d.data[i].tr, prev.nextS…
+
+ tbody.hidden = !nrows;
};
d.scroll = function(y) {
bodyel.scrollTop = y;
@@ -133,6 +135,7 @@ function datatable_init(el) {
for (var i = 0; i < data.length; i++)
tbody.appendChild(data[i].tr);
d.table.replaceChild(tbody, d.tbody);
+ tbody.hidden = !data.length;
d.tbody = tbody;
};
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.