diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 61ff43b..6471ed0 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -507,7 +507,7 @@ textarea[id^=wmd-input] { height: 213px; } .reply2-wmd-preview { - width: 460px; + width: 518px; } .wmd-prompt-background { background-color: Black; diff --git a/views/topic/index.html b/views/topic/index.html index 47bd26d..3de80ee 100644 --- a/views/topic/index.html +++ b/views/topic/index.html @@ -178,17 +178,23 @@ } run_md_editor(); + $('#wmd-input').mouseover(function(){ + $('#wmd-input').focus() + }); + $('.reply2_btn').click(function () { var $btn = $(this); // var editor = $btn.parent().next('.reply2_area').find('.reply2_editor'); var editor = $btn.parent().parent().find('.reply2_editor'); - editor.slideToggle('fast'); + editor.slideToggle('fast'); + editor.find('textarea').focus(); }); $('.reply2_at_btn').click(function () { var $btn = $(this); var editor = $btn.parents('.reply2_area').find('.reply2_editor'); editor.show('fast'); + editor.find('textarea').focus(); var user = $btn.parents('.reply2_item').find('.reply_author').find('a').html(); var textarea = editor.find('textarea'); if (textarea.val().indexOf(user) === -1) {