From 137031a1b2c8b6d5c9495fc005f981ff69e86170 Mon Sep 17 00:00:00 2001 From: John van Breda Date: Thu, 28 Nov 2019 17:41:31 +0000 Subject: [PATCH] Fixes squashed columns in IE11 after verify last record. https://github.com/BiologicalRecordsCentre/iRecord/issues/554 --- js/indicia.datacomponents/jquery.idc.dataGrid.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/indicia.datacomponents/jquery.idc.dataGrid.js b/js/indicia.datacomponents/jquery.idc.dataGrid.js index 003637ac..b2cdb103 100644 --- a/js/indicia.datacomponents/jquery.idc.dataGrid.js +++ b/js/indicia.datacomponents/jquery.idc.dataGrid.js @@ -783,7 +783,9 @@ $(el).find('.col-' + idx).css('width', (100 * (maxCharsPerCol['col-' + idx] / maxCharsPerRow)) + '%'); }); // Space header if a scroll bar visible. - $(el).find('.scroll-spacer').css('width', (tbody[0].offsetWidth - tbody[0].clientWidth) + 'px'); + if (tbody.find('tr').length > 0) { + $(el).find('.scroll-spacer').css('width', (tbody[0].offsetWidth - tbody[0].clientWidth) + 'px'); + } } }