diff --git a/js/client-chat-tournament.js b/js/client-chat-tournament.js index 56a0e73c62b..d7fb169b299 100644 --- a/js/client-chat-tournament.js +++ b/js/client-chat-tournament.js @@ -60,11 +60,11 @@ var innerX = 0; var innerY = 0; - $element.on('mousedown', function (e) { + $element.on('pointerdown', function (e) { innerX = e.pageX + ($element.parent().width() - $element.width() - this.offsetLeft); innerY = e.pageY - this.offsetTop; - function mouseMoveCallback(e) { + function pointerMoveCallback(e) { position.right = innerX - e.pageX; position.top = e.pageY - innerY; delete position.isDefault; @@ -74,9 +74,9 @@ top: position.top }); } - $(document).on('mousemove', mouseMoveCallback) - .one('mouseup', function () { - $(document).off('mousemove', mouseMoveCallback); + $(document).on('pointermove', pointerMoveCallback) + .one('pointerup', function () { + $(document).off('pointermove', pointerMoveCallback); }); }); } diff --git a/style/client.css b/style/client.css index 209636cfaf6..80ed47b0351 100644 --- a/style/client.css +++ b/style/client.css @@ -1219,6 +1219,7 @@ a.ilink.yours { overflow: hidden; transition: max-height 0.15s; -webkit-transition: max-height 0.15s; + touch-action: none; } .tournament-bracket { @@ -1226,15 +1227,19 @@ a.ilink.yours { padding: 10px; overflow: hidden; font-size: 8pt; + touch-action: none; } + .tournament-bracket-overflowing { height: 200px; padding: 0; position: relative; left: 0; top: 0; + touch-action: none; } + .tournament-popout-link { position: absolute; bottom: 0.5em; diff --git a/style/client2.css b/style/client2.css index 8e46d6c08d8..4a3b2591200 100644 --- a/style/client2.css +++ b/style/client2.css @@ -1147,6 +1147,7 @@ a.ilink.yours { overflow: hidden; transition: max-height 0.15s; -webkit-transition: max-height 0.15s; + touch-action: none; } .tournament-bracket { @@ -1154,6 +1155,7 @@ a.ilink.yours { padding: 10px; overflow: hidden; font-size: 8pt; + touch-action: none; } .tournament-bracket-overflowing { height: 200px; @@ -1161,6 +1163,7 @@ a.ilink.yours { position: relative; left: 0; top: 0; + touch-action: none; } .tournament-popout-link {