From cde6a91246d00f6ed5b938e8376933060b7a91b5 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke <marijn@haverbeke.nl> Date: Thu, 2 Feb 2017 12:56:25 +0100 Subject: [PATCH] Avoid setting a negative width style Since this raises an exception in IE8 --- src/display/scrollbars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/scrollbars.js b/src/display/scrollbars.js index 2026a3b0..d03850be 100644 --- a/src/display/scrollbars.js +++ b/src/display/scrollbars.js @@ -69,7 +69,7 @@ class NativeScrollbars { this.horiz.style.left = measure.barLeft + "px" let totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0) this.horiz.firstChild.style.width = - (measure.scrollWidth - measure.clientWidth + totalWidth) + "px" + Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px" } else { this.horiz.style.display = "" this.horiz.firstChild.style.width = "0" -- GitLab