Browse Source

fixed to close and to unfocus form after posting

fixed to close and to unfocus form after posting
master
Hedgehog 11 years ago
parent
commit
eff69a55a4
  1. 11
      js/interface_common.js

11
js/interface_common.js

@ -391,10 +391,6 @@ function replyTextKeypress(e) {
$this.val($this.val().trim()); $this.val($this.val().trim());
if( !tweetAction.hasClass("disabled")) { if( !tweetAction.hasClass("disabled")) {
tweetAction.click(); tweetAction.click();
if($this.parent().parent().parent().is('.post-area,.post-reply-content')){
$this.parent().parent().removeClass('open');
$this.blur();
}
} }
} }
}else if(localStorage['keysSend'] == 2){ }else if(localStorage['keysSend'] == 2){
@ -403,10 +399,6 @@ function replyTextKeypress(e) {
$this.val($this.val().trim()); $this.val($this.val().trim());
if( !tweetAction.hasClass("disabled") ) { if( !tweetAction.hasClass("disabled") ) {
tweetAction.click(); tweetAction.click();
if($this.parent().parent().parent().is('.post-area,.post-reply-content')){
$this.parent().parent().removeClass('open');
$this.blur();
}
} }
} }
} }
@ -436,6 +428,9 @@ var postSubmit = function(e)
remainingCount.text(140); remainingCount.text(140);
$replyText.attr("placeholder", "Your message was sent!"); $replyText.attr("placeholder", "Your message was sent!");
closeModal($this); closeModal($this);
if($this.closest('.post-area,.post-reply-content')){
$('.post-area-new').removeClass('open').find('textarea').blur();
};
setTimeout('requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly)', 1000); setTimeout('requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly)', 1000);
} }

Loading…
Cancel
Save