Skip to content
Snippets Groups Projects
Commit cde6a912 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

Avoid setting a negative width style

Since this raises an exception in IE8
parent 946d2bb7
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ class NativeScrollbars { ...@@ -69,7 +69,7 @@ class NativeScrollbars {
this.horiz.style.left = measure.barLeft + "px" this.horiz.style.left = measure.barLeft + "px"
let totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0) let totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0)
this.horiz.firstChild.style.width = this.horiz.firstChild.style.width =
(measure.scrollWidth - measure.clientWidth + totalWidth) + "px" Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"
} else { } else {
this.horiz.style.display = "" this.horiz.style.display = ""
this.horiz.firstChild.style.width = "0" this.horiz.firstChild.style.width = "0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment