projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
13d00ef
)
Fix tooltips removal on smartphone
author
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 8 Apr 2020 18:41:27 +0000
(20:41 +0200)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 8 Apr 2020 18:41:27 +0000
(20:41 +0200)
client/src/views/Game.vue
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
6d506c5
..
fa5a86d
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-1208,15
+1208,17
@@
export default {
game
);
if ("ontouchstart" in window) {
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) {
}
this.$refs["basegame"].re_setVariables(this.game);
if (!this.gameIsLoading) {