Skip to content

[BUG] Webview content not rendered until the window is resized (regression in v0.4.0) #47

Description

@FliPPeDround

Summary

After upgrading from @webviewjs/webview v0.3.0 to v0.4.0, on macOS the webview
content is not painted on launch. The window appears blank until the user
resizes the window — at which point the content renders immediately. Downgrading
back to v0.3.0 with the exact same code renders correctly on launch without any
interaction.

Steps to reproduce

import { Application } from "@webviewjs/webview";

const app = new Application();
const window = app.createBrowserWindow();

const webview = window.createWebview({
  html: `<!DOCTYPE html>
    <html>
        <head>
            <title>Webview</title>
        </head>
        <body>
            <h1 id="output">Hello world!</h1>
        </body>
    </html>
    `,
});

app.run();
  • On v0.3.0: "Hello world!" is displayed immediately on launch.
  • On v0.4.0: the window is blank until the user resizes it; the content then
    renders and stays correct afterwards.

Expected behavior

Webview content is painted on launch, as in v0.3.0.

Actual behavior

Content is not rendered until the window is resized. Once resized, the content
renders and subsequent updates work normally.

Environment

  • @webviewjs/webview: 0.4.0 (broken) / 0.3.0 (works)
  • OS: macOS 15.7.7 (Build 24G720), Darwin Kernel 24.6.0
  • Machine: MacBook Pro 17,1 (Apple M1, 8 GB RAM), arm64
  • Node.js: v24.18.0
  • Package manager: pnpm 10.6.2

Regression

This is a regression from v0.3.0 → v0.4.0 on macOS. Same code, same machine —
only the @webviewjs/webview version differs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions