)
img(src="/images/icons/draw.svg")
button.tooltip(
- v-if="!!game.mycolor"
+ v-show="!!game.mycolor"
@click="abortGame()"
:aria-label="st.tr['Abort']"
)
img(src="/images/icons/abort.svg")
button.tooltip(
- v-if="!!game.mycolor"
+ v-show="!!game.mycolor"
@click="resign()"
:aria-label="st.tr['Resign']"
)
.addEventListener("click", processModalClick);
}
);
- if ("ontouchstart" in window) {
- // Disable tooltips on smartphones:
- document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
- elt.classList.remove("tooltip");
- });
- }
},
beforeDestroy: function() {
this.cleanBeforeDestroy();
},
game
);
+ if ("ontouchstart" in window) {
+ this.$nextTick(() => {
+ // Disable tooltips on smartphones:
+ document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
+ elt.classList.remove("tooltip");
+ });
+ });
+ }
this.$refs["basegame"].re_setVariables(this.game);
if (!this.gameIsLoading) {
// Initial loading:
// In corr games, callback to change page only after score is set:
gameOver: function(score, scoreMsg, callback) {
this.game.score = score;
+ if ("ontouchstart" in window) {
+ this.$nextTick(() => {
+ // Disable tooltips on smartphones
+ // (might be required for rematch button at least):
+ document.querySelectorAll("#aboveBoard .tooltip").forEach(elt => {
+ elt.classList.remove("tooltip");
+ });
+ });
+ }
if (!scoreMsg) scoreMsg = getScoreMessage(score);
this.game.scoreMsg = scoreMsg;
document.getElementById("modalRules").checked = false;