diff --git a/src/atom/editor.coffee b/src/atom/editor.coffee index e2463f593..93f8a15c7 100644 --- a/src/atom/editor.coffee +++ b/src/atom/editor.coffee @@ -18,10 +18,11 @@ class Editor extends View @content: -> @div class: 'editor', tabindex: -1, => - @subview 'gutter', new Gutter - @div class: 'horizontal-scroller', outlet: 'horizontalScroller', => - @div class: 'lines', outlet: 'lines', => - @input class: 'hidden-input', outlet: 'hiddenInput' + @div class: 'scrollable-content', => + @subview 'gutter', new Gutter + @div class: 'horizontal-scroller', outlet: 'horizontalScroller', => + @div class: 'lines', outlet: 'lines', => + @input class: 'hidden-input', outlet: 'hiddenInput' vScrollMargin: 2 hScrollMargin: 10 diff --git a/static/atom.css b/static/atom.css index ab16fe004..4ff987366 100644 --- a/static/atom.css +++ b/static/atom.css @@ -10,6 +10,8 @@ body { #root-view { height: 100%; + height: 100%; + overflow-y: auto; position: relative; background-image: url(static/images/linen.png); } diff --git a/static/editor.css b/static/editor.css index 7535448c0..490c1f0ce 100644 --- a/static/editor.css +++ b/static/editor.css @@ -1,18 +1,17 @@ .editor { - display: -webkit-box; - font: 18px Inconsolata, Monaco, Courier !important; - position: relative; - width: 100%; height: 100%; background: #333; + font: 18px Inconsolata, Monaco, Courier !important; color: white; cursor: default; overflow-y: auto; - overflow-x: auto; - -webkit-user-select: none; } +.editor .scrollable-content { + display: -webkit-flexbox; +} + .editor.single-line { overflow-y: hidden; } @@ -30,7 +29,7 @@ .editor .horizontal-scroller { overflow-x: auto; - -webkit-box-flex: 1; + width: -webkit-flex(1); } .editor.soft-wrap .horizontal-scroller {