mirror of
https://github.com/zulip/zulip.git
synced 2026-07-03 21:10:12 +08:00
keydown_util: Extend event type for is_enter_event function.
To accommodate both keydown and keyup events, this commit updates the function signature to accept both `JQuery.KeyDownEvent` and `JQuery.KeyUpEvent` types. An example of using keyup event is in `poll_widget.ts`.
This commit is contained in:
parent
789d052116
commit
721fbb1bed
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user