mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	keydown_util: Extract all 'Enter' events to one place.
This is a prep commit to fix #22062.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							aeb9a27d0e
						
					
				
				
					commit
					d4379f9528
				
			@@ -2,6 +2,7 @@ import $ from "jquery";
 | 
			
		||||
 | 
			
		||||
import * as channel from "./channel";
 | 
			
		||||
import {$t, $t_html} from "./i18n";
 | 
			
		||||
import * as keydown_util from "./keydown_util";
 | 
			
		||||
import * as loading from "./loading";
 | 
			
		||||
import * as ui_report from "./ui_report";
 | 
			
		||||
import * as user_group_create_members from "./user_group_create_members";
 | 
			
		||||
@@ -182,7 +183,7 @@ export function set_up_handlers() {
 | 
			
		||||
    // Do not allow the user to enter newline characters while typing out the
 | 
			
		||||
    // group's description during it's creation.
 | 
			
		||||
    $container.on("keydown", "#create_user_group_description", (e) => {
 | 
			
		||||
        if (e.key === "Enter") {
 | 
			
		||||
        if (keydown_util.is_enter_event(e)) {
 | 
			
		||||
            e.preventDefault();
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user