X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=fa5a86d63cb537af5e892c4f736d6698a0f95076;hb=98f149990956bca9ced09c22b29a37ab849b9896;hp=6d506c5fb18de830255208536d516c4b0cbbc694;hpb=13d00ef164983c0e0a42b739a13bdc9eb3f1d21e;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 6d506c5f..fa5a86d6 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -1208,15 +1208,17 @@ export default { game ); if ("ontouchstart" in window) { - this.$nextTick(() => { - // Disable tooltips on smartphones: - document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => { - -alert(elt); - - elt.classList.remove("tooltip"); - }); - }); + // TODO: I don't like this timeout, but $nextTick() fails, + // and in mounted() hook that fails too. + setTimeout( + () => { + // Disable tooltips on smartphones: + document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => { + elt.classList.remove("tooltip"); + }); + }, + 750 + ); } this.$refs["basegame"].re_setVariables(this.game); if (!this.gameIsLoading) {