@ -32,7 +32,7 @@
function quoteResult(result) {
var reply = $("#reply"),
subject = $("#reply_subject"),
content = $("#reply_content");
focusElement = jQuery("#reply #message-form");
subject.val(result.subject);
@ -43,10 +43,9 @@
});
reply.slideDown();
content.focus();
$('html, body').animate({
scrollTop: content.offset().top
scrollTop: focusElement.offset().top
}, 1000);
}
@ -29,7 +29,7 @@ See docs/COPYRIGHT.rdoc for more details.
<%= error_messages_for 'message' %>
<% replying ||= false %>
<div class="form--field">
<%= f.text_field :subject, required: true, container_class: '-wide' %>
<%= f.text_field :subject, required: true, container_class: '-wide', autofocus: true %>
</div>
<% unless replying %>