From 6342dff96de6784d4949a0d05a27b266f1f55941 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 7 Jan 2011 15:53:15 -0800 Subject: [PATCH] fixed enter js bug on comments. removed enter hotkey on publisher completely. --- public/javascripts/stream.js | 1 + public/javascripts/view.js | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index aa9d23103..aedb11432 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -24,6 +24,7 @@ var Stream = { $stream.delegate("textarea.comment_box", "keydown", function(e){ if (e.keyCode === 13) { if(!e.shiftKey) { + $(this).blur(); $(this).closest("form").submit(); } } diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 2ca2b533a..91b95198c 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -33,10 +33,6 @@ var View = { $(this.gettingStarted.selector) .live("click", this.gettingStarted.click); - /* Submitting the status message form when the user hits enter */ - $(this.publisher.selector) - .keydown(this.publisher.keydown); - /* User menu */ $(this.userMenu.selector) .click(this.userMenu.click); @@ -126,17 +122,6 @@ var View = { selector: ".new_request" }, - publisher: { - keydown: function(e) { - if(e.keyCode === 13) { - if(!e.shiftKey) { - $(this).closest("form").submit(); - } - } - }, - selector: "#publisher textarea" - }, - search: { blur: function() { $(this).removeClass("active");