fix(player-assist): ignore tab press during remote control

This commit is contained in:
Alex Kaminskii 2022-05-20 22:26:22 +02:00
parent 9d19b93df2
commit 7ae3a756df

View file

@ -246,7 +246,16 @@ export default class AssistManager {
this.socket && this.socket.emit("input", el.innerText)
}
}
//el.onkeydown = e => e.preventDefault()
// TODO: send "focus" event to assist with the nodeID
el.onkeydown = e => {
if (e.key == "Tab") {
e.preventDefault()
}
}
el.onblur = () => {
el.oninput = null
el.onblur = null
}
}
this.socket.emit("click", [ data.x, data.y ]);
}