mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
messages: Add support for right-to-left messages.
This implements right-to-left message automatic detection support in the compose box as well as the message feed. Full unit tests and support in the message-editing UI are for future work (as are potentially more fancy things like supporting things like right-to-left multi-word names for users/streams/etc.). Fixes #3123.
This commit is contained in:
committed by
Tim Abbott
parent
649fccde6b
commit
0757d022f5
@@ -406,6 +406,12 @@ MessageListView.prototype = {
|
||||
blueslip.warn('Only DOM nodes can be passed to _post_process_messages');
|
||||
}
|
||||
var row = $(dom_message);
|
||||
var content = row.find('.message_content');
|
||||
|
||||
// Set the rtl class if the text has an rtl direction
|
||||
if (rtl.get_direction(content.text()) === 'rtl') {
|
||||
content.addClass('rtl');
|
||||
}
|
||||
|
||||
// Save DOM elements by id into self._rows for O(1) lookup
|
||||
if (row.hasClass('message_row')) {
|
||||
|
||||
Reference in New Issue
Block a user