Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix content clipping issue when editing long documents.

Fixes #30
  • Loading branch information...
commit 43f3cbef70d426a4f444a122589620b01dbebe55 1 parent da14145
@bobthecow bobthecow authored
View
8 genghis.php
4 additions, 4 deletions not shown
View
4 genghis.rb
2 additions, 2 deletions not shown
View
6 src/css/editor.less
@@ -15,14 +15,8 @@
display: none;
}
padding: 0;
- height: 400px;
background-color: white;
.clearfix;
- .CodeMirror-scroll {
- // CodeMirror should auto-adjust height inside a document view.
- height: auto;
- overflow: visible;
- }
}
&.focused {
div.well {
View
6 src/js/genghis/views/document_view.js
@@ -62,11 +62,9 @@ Genghis.Views.DocumentView = Genghis.Views.BaseDocument.extend({
var $well = this.$('.well');
var height = Math.max(180, Math.min(600, $well.height() + 40));
- $well.height(height);
var textarea = $('<textarea id="editor-'+this.model.id+'"></textarea>')
.text(this.model.JSONish())
- .appendTo($well)
- .height(height);
+ .appendTo($well);
this.$('.document').hide();
@@ -80,6 +78,8 @@ Genghis.Views.DocumentView = Genghis.Views.BaseDocument.extend({
}
}));
+ this.editor.setSize(null, height);
+
setTimeout(this.editor.focus, 50);
textarea.resize(_.throttle(this.editor.refresh, 100));
Please sign in to comment.
Something went wrong with that request. Please try again.