phone focus fix
This commit is contained in:
parent
6250f367ef
commit
da44834191
3 changed files with 3 additions and 1 deletions
|
@ -36,4 +36,4 @@ function game() {
|
||||||
net.connect(); //connect to server, create a player, and retrieve all players info
|
net.connect(); //connect to server, create a player, and retrieve all players info
|
||||||
|
|
||||||
|
|
||||||
setInterval(game);
|
setInterval(game, 16);
|
|
@ -7,6 +7,7 @@ class Network{
|
||||||
|
|
||||||
message(data){
|
message(data){
|
||||||
switch(data.type){
|
switch(data.type){
|
||||||
|
|
||||||
case 'connect':
|
case 'connect':
|
||||||
this.playerId = data.data.playerId;
|
this.playerId = data.data.playerId;
|
||||||
for (let i = 0; i<data.data.players.length; i++) {
|
for (let i = 0; i<data.data.players.length; i++) {
|
||||||
|
|
|
@ -40,6 +40,7 @@ class Phone{
|
||||||
if(input.value!=''){
|
if(input.value!=''){
|
||||||
this.sendMessage(player.name, input.value);
|
this.sendMessage(player.name, input.value);
|
||||||
input.value = '';
|
input.value = '';
|
||||||
|
input.blur()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue