fixed enter js bug on comments. removed enter hotkey on publisher completely.

This commit is contained in:
danielvincent 2011-01-07 15:53:15 -08:00
parent 36d6864b40
commit 6342dff96d
2 changed files with 1 additions and 15 deletions

View file

@ -24,6 +24,7 @@ var Stream = {
$stream.delegate("textarea.comment_box", "keydown", function(e){ $stream.delegate("textarea.comment_box", "keydown", function(e){
if (e.keyCode === 13) { if (e.keyCode === 13) {
if(!e.shiftKey) { if(!e.shiftKey) {
$(this).blur();
$(this).closest("form").submit(); $(this).closest("form").submit();
} }
} }

View file

@ -33,10 +33,6 @@ var View = {
$(this.gettingStarted.selector) $(this.gettingStarted.selector)
.live("click", this.gettingStarted.click); .live("click", this.gettingStarted.click);
/* Submitting the status message form when the user hits enter */
$(this.publisher.selector)
.keydown(this.publisher.keydown);
/* User menu */ /* User menu */
$(this.userMenu.selector) $(this.userMenu.selector)
.click(this.userMenu.click); .click(this.userMenu.click);
@ -126,17 +122,6 @@ var View = {
selector: ".new_request" selector: ".new_request"
}, },
publisher: {
keydown: function(e) {
if(e.keyCode === 13) {
if(!e.shiftKey) {
$(this).closest("form").submit();
}
}
},
selector: "#publisher textarea"
},
search: { search: {
blur: function() { blur: function() {
$(this).removeClass("active"); $(this).removeClass("active");