aboutsummaryrefslogtreecommitdiffstats
path: root/tools/video-touch-tap-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/video-touch-tap-test.js')
-rw-r--r--tools/video-touch-tap-test.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/video-touch-tap-test.js b/tools/video-touch-tap-test.js
index 6a45c9e..71ffe9c 100644
--- a/tools/video-touch-tap-test.js
+++ b/tools/video-touch-tap-test.js
@@ -111,7 +111,7 @@ try {
await sleep(1200);
check('…or land on the pager (pausing the clip, raising the details)', await page.evaluate(() => {
const p = document.querySelector('.media-pager'); const sc = p && p.querySelector('.mp-scroll');
- const cur = sc && [...sc.children].find((x) => Math.abs(x.offsetTop - sc.scrollTop) < 4);
+ const cur = sc && [...sc.querySelectorAll('.mp-slide')].find((x) => { const r = x.getBoundingClientRect(); return Math.abs(r.top) < 4 && Math.abs(r.left) < 4; });
const v = cur && cur.querySelector('video.mp-media');
return !!p && !p.classList.contains('show') && !!v && !v.paused;
}));