Skip to content

Commit f4f023a

Browse files
committed
Prevent IE error when initializing w/ lineWrap wo/ scrollbar
1 parent 94b8ca1 commit f4f023a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ var CodeMirror = (function() {
11411141
var shouldHaveScrollbar = scrollHeight ? "block" : "none";
11421142
if (scrollbar.style.display != shouldHaveScrollbar) {
11431143
scrollbar.style.display = shouldHaveScrollbar;
1144-
scrollbarInner.style.height = scrollHeight + "px";
1144+
if (scrollHeight) scrollbarInner.style.height = scrollHeight + "px";
11451145
checkHeights();
11461146
}
11471147
}

0 commit comments

Comments
 (0)