X-Git-Url: https://git.auder.net/variants/%24%7Bvname%7D/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=89edb96d25bded7121909d3c46f766bd7fc72cef;hb=68e3aa8c7a92efe3461bfc5c904f9763bca5d2da;hp=f7e5549453c65a8ff24c2355ce8d52f3af1848c1;hpb=1112f1fdd39a4599cebc4b0b03bee1d28f1236ee;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index f7e55494..89edb96d 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -236,7 +236,10 @@ export default { clearInterval(this.retrySendmove); if (!!this.clockUpdate) clearInterval(this.clockUpdate); + this.conn.removeEventListener("message", this.socketMessageListener); + this.conn.removeEventListener("close", this.socketCloseListener); this.send("disconnect"); + this.conn = null; }, visibilityChange: function() { // TODO: Use document.hidden? https://webplatform.news/issues/2019-03-27 @@ -460,6 +463,9 @@ export default { this.people[data.from] = { focus: true }; this.newConnect[data.from] = true; //for self multi-connects tests this.send("askidentity", { target: data.from }); + } else if (!this.people[data.from].focus) { + this.people[data.from].focus = true; + this.$forceUpdate(); //TODO: shouldn't be required } break; case "disconnect": @@ -522,6 +528,7 @@ export default { if (!this.killed[this.st.user.sid]) { // Ask potentially missed last state, if opponent and I play if ( + !this.gotLastate && !!this.game.mycolor && this.game.type == "live" && this.game.score == "*" &&