mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 05:23:35 +00:00 
			
		
		
		
	typeahead: Fix thin blue line bug when there is space after >.
				
					
				
			When the user added space/s right after the topic typehead symbol `>`, a thin blue line would be selected at the top of the typeahead menu. To avoid this and to make stream and topic typeaheads' behaviour more consistent with each other, space/s right after `>` is not allowed, like it is not allowed right after `#`. Fixes: #19124.
This commit is contained in:
		@@ -723,6 +723,12 @@ export function get_candidates(query) {
 | 
			
		||||
            if (tokens[1]) {
 | 
			
		||||
                const stream_name = tokens[1];
 | 
			
		||||
                this.token = tokens[2] || "";
 | 
			
		||||
 | 
			
		||||
                // Don't autocomplete if there is a space following '>'
 | 
			
		||||
                if (this.token[0] === " ") {
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                const topic_list = topics_seen_for(stream_name);
 | 
			
		||||
                if (should_show_custom_query(this.token, topic_list)) {
 | 
			
		||||
                    topic_list.push(this.token);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user