Skip to content

Commit 22ee5fb

Browse files
committed
work around strange webkit issue
when a css rule assigning width: 100%, border&padding: 0 existed for textareas, the editor would slow down to a crawl on webkit for some unfathomable reason
1 parent e617a92 commit 22ee5fb

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
@@ -25,7 +25,7 @@ var CodeMirror = (function() {
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>' +
2727
'<div style="overflow: hidden; position: absolute; width: 0; left: 0">' + // Wraps and hides input textarea
28-
'<textarea style="height: 1px; position: absolute;" wrap="off"></textarea></div>' +
28+
'<textarea style="height: 1px; position: absolute; width: 1px;" wrap="off"></textarea></div>' +
2929
// Provides positioning relative to (visible) text origin
3030
'<div class="CodeMirror-lines"><div style="position: relative">' +
3131
'<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor

0 commit comments

Comments
 (0)