question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Webkit in Docker only scroll once

See original GitHub issue

Context:

  • Playwright Version: 1.5.2
  • Operating System: Linux
  • Node.js version: 12
  • Browser: Chromium, WebKit
  • Extra: It’s the Docker image provided by you
  System:
    OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    Memory: 2.25 GB / 3.84 GB
    Container: Yes
  Binaries:
    Node: 12.19.0 - /usr/bin/node
    Yarn: 1.22.10 - /usr/bin/yarn
    npm: 6.14.8 - /usr/bin/npm
  Languages:
    Bash: 5.0.17 - /usr/bin/bash

Code Snippet

I created a repository that could be used to easily reproduce the error: https://github.com/Marfeel/use-cases/tree/master/playwright-docker-webkit

but here is the gist of it

test('the page should scroll down twice', async () => {
  await page.goto('http://localhost:8084')

  // the scroll is at the very top
  expect(await page.evaluate(() => window.scrollY)).toBe(0);
  // there is enough scroll heigth available
  expect(await page.evaluate(() => document.documentElement.scrollHeight)).toBeGreaterThan(400);

  await page.waitForFunction(() => window.scroll(0, 100) || true);
  // just to check the scroll worked
  expect(await page.evaluate(() => window.scrollY)).toBe(100);

  await page.waitForFunction(() => window.scroll(0, 200) || true);
  // this expectation should pass on host and fail on docker
  expect(await page.evaluate(() => window.scrollY)).toBe(200);
});

Describe the bug

My team was using playwright in our computers (all macs) but we wanted to make it part of our CI tests. I changed the docker image we used to yours and tests that rely on scrolling to trigger some behaviour started failing in webkit (all tests run fine on chromium). The problem seems to be that only the first call to window.scroll(...) is taking effect.

Please let me know if you need more information, and available to help with it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
JoelEinbindercommented, Feb 23, 2021

Thanks for fixing this one 👏 👏 👏 👏

Will this be released as a minor or a patch?

It’ll be a minor release. Targeting 1.9 which should be released shortly.

1reaction
diegofernandezmrfcommented, Feb 23, 2021

Thanks for fixing this one 👏 👏 👏 👏

Will this be released as a minor or a patch?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Div scrolling freezes sometimes if I use -webkit-overflow ...
For me, the freezing was repeatable and happened when trying to scroll up or down when already at the top or bottom, respectively....
Read more >
Mac overlay scrollbar appears without scrolling, doesn't ...
A further bug exists that if you scroll to the bottom and back to the top, the popup scroll bar no longer appears...
Read more >
webkit-overflow-scrolling:touch doesn't become scrollable after...
Steps to reproduce: 1. Open http://output.jsbin.com/tuxahu/quiet in iOS 9.3 Safari. 2. Tap the "Go" button. 3. Observe that a modal dialog ...
Read more >
Chrome Browser Bug: Scroll Wheel Randomly Stops Working ...
... Chrome browser bug in which the scrolling of an overflow container ... have only experienced the issue with an overflow container -...
Read more >
Frequently asked questions — Vuetify
Error : Cannot find module 'node-sass'. Ensure that your @vue/cli-* packages located in package.json are at least ^3.5.0. Invalid CSS after ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found