Skip to content

Commit

Permalink
Changes rtl check in ChatMessages class (#4049)
Browse files Browse the repository at this point in the history
* Added view-d-room to guest role

So they can see direct messages.

* valueChanged optimization

valueChange checks if the text is rtl or ltr on every input, changed the method to check only the first input.

* Update startup.coffee

* Fixes pr #4049

fixes the value.lenght to value.length and used the this.value instead of the value in the parameter

* Update chatMessages.coffee

* Update startup.coffee

* Update startup.coffee
  • Loading branch information
MartinSchoeler authored and engelgabriel committed Aug 25, 2016
1 parent 50a2423 commit 41e140f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/rocketchat-ui/lib/chatMessages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ class @ChatMessages
RoomHistoryManager.clear rid

valueChanged: (rid, event) ->
this.determineInputDirection()
if this.input.value.length is 1
this.determineInputDirection()

determineInputDirection: () ->
this.input.dir = if this.isMessageRtl(this.input.value) then 'rtl' else 'ltr'
Expand Down

0 comments on commit 41e140f

Please sign in to comment.