X-Git-Url: https://git.auder.net/game/%22%20%20%20data.gameInfo.gameId%20%20%20%22?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FMoveList.vue;h=ded140d9cd376c46b1eb04604f77cfbe6d13ced8;hb=abb5917eabac5f6da6841c35567c706066409e44;hp=6f7b4dce56c11c14ab14af828c12f840cacb8af1;hpb=feaf1bf73fa8c6054e353585dee0b8a4fdcfbc4e;p=vchess.git diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index 6f7b4dce..ded140d9 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -77,6 +77,12 @@ export default { document.getElementById("adjuster").addEventListener( "click", processModalClick); + if ("ontouchstart" in window) { + // Disable tooltips on smartphones: + document.querySelectorAll("#aboveMoves .tooltip").forEach(elt => { + elt.classList.remove("tooltip") + }); + } // Take full width on small screens: let boardSize = parseInt(localStorage.getItem("boardSize")); if (!boardSize) { @@ -109,7 +115,10 @@ export default { // $nextTick to wait for table > tr to be rendered this.$nextTick(() => { let curMove = document.querySelector(".td.highlight-lm"); - if (curMove) { + if (!curMove && this.moves.length > 0) + // Cursor is before game beginning, and some moves were made: + curMove = document.querySelector(".moves-list > .tr:first-child > .td"); + if (!!curMove) { curMove.scrollIntoView({ behavior: "auto", block: "nearest" @@ -188,6 +197,11 @@ img.inline @media screen and (max-width: 767px) height: 18px +#scoreInfo + margin: 10px 0 + @media screen and (max-width: 767px) + margin: 5px 0 + span.score display: inline-block margin-left: 10px @@ -210,4 +224,7 @@ span#rulesBtn button margin: 0 + +button.tooltip + padding-bottom: 5px