Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Commit

Permalink
resize the textarea before centering it
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed Jun 22, 2011
1 parent 0f6e51f commit cd783e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/copy/admin/index.js.erb
Expand Up @@ -54,7 +54,10 @@ jQuery.noConflict();
$.ajax({
url: '/_copy/'+copy.attr('data-name'),
success: function(html) {
// Attach the editor and resize the text area.
$('body').prepend(html);
resizeTextarea();
// Center the editor on the screen.
$('#_copy').css({ margin:'-'+($('#_copy').height() / 2)+'px 0 0 -'+($('#_copy').width() / 2)+'px' });
$('#_copy textarea').focus();
}
Expand Down

0 comments on commit cd783e2

Please sign in to comment.