mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-13 19:04:06 +08:00
fix input focus not working
This commit is contained in:
parent
ec33dde462
commit
9ce54f4cda
1 changed files with 6 additions and 4 deletions
|
|
@ -331,7 +331,9 @@ $(".pageTest #result #tribeResultBottom .chat .input input").on(
|
|||
);
|
||||
|
||||
$(document).on("keydown", (e) => {
|
||||
if (TribeState.isInARoom()) {
|
||||
if (!TribeState.isInARoom()) return;
|
||||
|
||||
if (TribeState.getRoomState() === TribeTypes.ROOM_STATE.LOBBY) {
|
||||
if (
|
||||
e.key === "/" &&
|
||||
!$(".pageTribe .lobby .chat .input input").is(":focus")
|
||||
|
|
@ -341,9 +343,9 @@ $(document).on("keydown", (e) => {
|
|||
}
|
||||
} else if (
|
||||
TestState.resultVisible &&
|
||||
(TribeState.getRoom()?.state === TribeTypes.ROOM_STATE.RACE_ONE_FINISHED ||
|
||||
TribeState.getRoom()?.state === TribeTypes.ROOM_STATE.SHOWING_RESULTS ||
|
||||
TribeState.getRoom()?.state === TribeTypes.ROOM_STATE.READY_TO_CONTINUE)
|
||||
(TribeState.getRoomState() === TribeTypes.ROOM_STATE.RACE_ONE_FINISHED ||
|
||||
TribeState.getRoomState() === TribeTypes.ROOM_STATE.SHOWING_RESULTS ||
|
||||
TribeState.getRoomState() === TribeTypes.ROOM_STATE.READY_TO_CONTINUE)
|
||||
) {
|
||||
if (
|
||||
e.key === "/" &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue