mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	refactor: new message content -> compose textarea.
This commit is contained in:
		@@ -22,7 +22,7 @@ exports.focus_in_empty_compose = function () {
 | 
			
		||||
    return (
 | 
			
		||||
        exports.composing() &&
 | 
			
		||||
        exports.message_content() === "" &&
 | 
			
		||||
        $('#new_message_content').is(':focus'));
 | 
			
		||||
        $('#compose-textarea').is(':focus'));
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function get_or_set(fieldname, keep_leading_whitespace) {
 | 
			
		||||
@@ -42,9 +42,9 @@ function get_or_set(fieldname, keep_leading_whitespace) {
 | 
			
		||||
// TODO: Break out setters and getter into their own functions.
 | 
			
		||||
exports.stream_name     = get_or_set('stream');
 | 
			
		||||
exports.subject         = get_or_set('subject');
 | 
			
		||||
// We can't trim leading whitespace in `new_message_content` because
 | 
			
		||||
// We can't trim leading whitespace in `compose_textarea` because
 | 
			
		||||
// of the indented syntax for multi-line code blocks.
 | 
			
		||||
exports.message_content = get_or_set('new_message_content', true);
 | 
			
		||||
exports.message_content = get_or_set('compose-textarea', true);
 | 
			
		||||
exports.recipient       = get_or_set('private_message_recipient');
 | 
			
		||||
 | 
			
		||||
exports.has_message_content = function () {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user