From 4284956f9711ca3412ff73cf2f9c0d0897d4e90a Mon Sep 17 00:00:00 2001 From: "a.poptsov" Date: Wed, 18 Feb 2015 23:45:30 +0300 Subject: [PATCH] fix unnecessary horizontal scroll when the table has sub pixel width --- slick.grid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slick.grid.js b/slick.grid.js index c12bae9bb..e30cddfbb 100644 --- a/slick.grid.js +++ b/slick.grid.js @@ -1082,7 +1082,7 @@ if (typeof Slick === "undefined") { growSize = Math.min(Math.floor(growProportion * currentWidth) - currentWidth, (c.maxWidth - currentWidth) || 1000000) || 1; } total += growSize; - widths[i] += growSize; + widths[i] += (total <= availWidth ? growSize : 0); } if (prevTotal >= total) { // avoid infinite loop break;