Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

keydown_util: Extend event type for `is_enter_event` function.

Junyao Chen721fbb1bed71
diff --git a/web/src/keydown_util.ts b/web/src/keydown_util.ts
index 310728c644f..8eb0dabae0d 100644
--- a/web/src/keydown_util.ts
+++ b/web/src/keydown_util.ts
@@ -30,7 +30,7 @@ export function handle(opts: {
});
}
-export function is_enter_event(event: JQuery.KeyDownEvent): boolean {
+export function is_enter_event(event: JQuery.KeyDownEvent | JQuery.KeyUpEvent): boolean {
// In addition to checking whether the key pressed was an Enter
// key, we need to check whether the keypress was part of an IME
// composing session, such as selecting a character using a