X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=9bb913c4809c6782ac9a5f218e511d62338f6b43;hp=d0cabb46d8099789751b8f323ff4352f12453496;hb=6f2f94374f1e73c375edf732d9425e575e81fff7;hpb=9dca2c935cebcaa3817b4f926f482f9cad4c5b53 diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index d0cabb46..9bb913c4 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -73,7 +73,10 @@ main ) fieldset(v-if="st.user.id > 0") label(for="selectPlayers") {{ st.tr["Play with"] }} - select#selectPlayersInList(v-model="newchallenge.to") + select#selectPlayersInList( + v-model="newchallenge.to" + @change="changeChallTarget()" + ) option(value="") option( v-for="p in Object.values(people)" @@ -453,6 +456,13 @@ export default { if (!!this.curChallToAccept.fen) return { "margin-top": "10px" }; return {}; }, + changeChallTarget: function() { + if (!this.newchallenge.to) { + // Reset potential FEN + diagram + this.newchallenge.fen = ""; + this.newchallenge.diag = ""; + } + }, cadenceFocusIfOpened: function() { if (event.target.checked) document.getElementById("cadence").focus(); @@ -903,7 +913,7 @@ export default { position: parsedFen.position, orientation: parsedFen.turn }); - } + } else this.newchallenge.diag = ""; }, newChallFromPreset(pchall) { this.partialResetNewchallenge();