Skip to content

[Bug]: WebKit/Linux] page.fill() does not fire React 19 onChange on synthetic input events #40303

@loganctallman

Description

@loganctallman

Version

playwright@1.59.1

Steps to reproduce

https://github.com/loganctallman/LoganGPT

Steps to Reproduce:

  1. Create a Next.js 15 app with a React 19 controlled :
    value={input} onChange={handleInputChange}
    (handleInputChange is from Vercel AI SDK's useChat hook, which calls
    React's standard setState internally)

  2. Write a Playwright test:
    await page.fill('[aria-label="Message input"]', 'hello');
    await expect(page.locator('button[type="submit"]')).toBeEnabled();

  3. Run on Linux CI (ubuntu-latest) with WebKit project:
    npx playwright test --project=webkit

  4. Observe: input value stays empty, button stays disabled.
    Same test passes on Chromium and Firefox (same Linux runner).

Expected behavior

Same behavior as Chromium/Firefox ie:

page.fill() populates the controlled input and onChange fires, enabling the submit button.

Actual behavior

onChange never fires on Linux WebKit. The value prop stays "". The submit button remains disabled.

Additional context

Environment:

  • Playwright: 1.59.1
  • OS: ubuntu-latest (GitHub Actions)
  • Browser: WebKit (Linux Playwright binary)
  • React: 19.2.4
  • Next.js: 15.5.14
  • Node: 22

Notes: The failure does not reproduce on macOS WebKit locally. page.type() and page.keyboard.type() exhibit the same failure. Setting the value via page.evaluate() bypasses React
controlled state entirely. The issue appears specific to the Linux WebKit binary's synthetic event propagation not reaching React 19's event delegation layer.

Error documented in actions on LoganGPT Repo and additional info in Testing.MD

Environment

System:                                                                                                                                                                            
      OS: macOS 12.7.6                                                                                                                                                                 
      CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz                                                                                                                           
      Memory: 368.29 MB / 16.00 GB                                                                                                                                                     
    Binaries:                                                                                                                                                                          
      Node: 24.14.0 - /usr/local/bin/node                                                                                                                                              
      npm: 11.9.0 - /usr/local/bin/npm
    Languages:                                                                                                                                                                         
      Bash: 3.2.57 - /bin/bash                                                                                                                                                         
    npmPackages:                                                                                                                                                                       
      @playwright/test: ^1.59.1 => 1.59.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions