Skip to content

Commit

Permalink
Fix Enter Behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Feb 16, 2017
1 parent d203f4d commit 89c4d94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Template.accountPreferences.helpers

selected: (property, value, defaultValue) ->
if not Meteor.user()?.settings?.preferences?[property]
return defaultValue
return defaultValue is true
else
return Meteor.user()?.settings?.preferences?[property] == value

Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui/lib/chatMessages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class @ChatMessages
this.resize(input)

if k is 13
if sendOnEnter is 'normal' || (sendOnEnter is 'desktop' and Meteor.Device.isDesktop())
if not sendOnEnter? || sendOnEnter is 'normal' || (sendOnEnter is 'desktop' and Meteor.Device.isDesktop())
if not event.shiftKey and not event.ctrlKey and not event.altKey and not event.metaKey # Enter without shift/ctrl/alt
event.preventDefault()
event.stopPropagation()
Expand Down

0 comments on commit 89c4d94

Please sign in to comment.