![](https://secure.gravatar.com/avatar/0c497bba81d8103574d6797e3b16ab9b.png?default=mp&rating=pg&size=250)
Richard Ludwig
Joined
10 Experience
0 Lessons Completed
0 Questions Solved
Activity
Using rails 6, I couldn't get the coffeescript to work, so I converted it to javascript
Put this in your chatroom show page as a workaround under the message input form.
(function() { $(document).on("turbolinks:load", function() { return $("#new_message").on("keypress", function(e) { if (e && e.keyCode === 13) { e.preventDefault(); $(this).submit(); return e.currentTarget.submit(); } }); }); }).call(this);