mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +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
@@ -16,6 +16,7 @@ import * as compose_state from "./compose_state";
|
||||
import * as confirm_dialog from "./confirm_dialog";
|
||||
import * as hash_util from "./hash_util";
|
||||
import {$t, $t_html} from "./i18n";
|
||||
import * as keydown_util from "./keydown_util";
|
||||
import * as loading from "./loading";
|
||||
import * as message_live_update from "./message_live_update";
|
||||
import * as message_view_header from "./message_view_header";
|
||||
@@ -663,7 +664,7 @@ export function setup_page(callback) {
|
||||
// streams, either explicitly via user_can_create_streams, or
|
||||
// implicitly because page_params.realm_is_zephyr_mirror_realm.
|
||||
$("#stream_filter input[type='text']").on("keypress", (e) => {
|
||||
if (e.key !== "Enter") {
|
||||
if (!keydown_util.is_enter_event(e)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user