mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	Keep compose open if left arrow does not cause message edit.
If somebody hits the left arrow to edit a message, but there are no messages available to edit, then leave them in the compose box.
This commit is contained in:
		@@ -507,7 +507,6 @@ exports.process_hotkey = function (e, hotkey) {
 | 
				
			|||||||
        // we handle this in other functions.
 | 
					        // we handle this in other functions.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (event_name === 'left_arrow' && focus_in_empty_compose()) {
 | 
					        if (event_name === 'left_arrow' && focus_in_empty_compose()) {
 | 
				
			||||||
            compose_actions.cancel();
 | 
					 | 
				
			||||||
            message_edit.edit_last_sent_message();
 | 
					            message_edit.edit_last_sent_message();
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -400,6 +400,7 @@ exports.edit_last_sent_message = function () {
 | 
				
			|||||||
    current_msg_list.select_id(msg.id, {then_scroll: true, from_scroll: true});
 | 
					    current_msg_list.select_id(msg.id, {then_scroll: true, from_scroll: true});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Finally do the real work!
 | 
					    // Finally do the real work!
 | 
				
			||||||
 | 
					    compose_actions.cancel();
 | 
				
			||||||
    message_edit.start(msg_row, function () {
 | 
					    message_edit.start(msg_row, function () {
 | 
				
			||||||
        ui_util.focus_on('message_edit_content');
 | 
					        ui_util.focus_on('message_edit_content');
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user