Skip to content

Commit d09d397

Browse files
committed
make sure the 'measure' span doesn't cause a scrollbar
1 parent 22ee5fb commit d09d397

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
@@ -20,7 +20,7 @@ var CodeMirror = (function() {
2020
// This mess creates the base DOM structure for the editor.
2121
wrapper.innerHTML =
2222
'<div style="position: relative">' + // Set to the height of the text, causes scrolling
23-
'<pre style="position: absolute; visibility: hidden">' + // To measure line/char size
23+
'<pre style="position: relative; height: 0; visibility: hidden; overflow: hidden;">' + // To measure line/char size
2424
'<span>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span></pre>' +
2525
'<div style="position: relative">' + // Moved around its parent to cover visible view
2626
'<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +

0 commit comments

Comments
 (0)