79713160

Date: 2025-07-24 10:17:41
Score: 0.5
Natty:
Report link

What you’re seeing is:

Why it happens On macOS, the underlying Cocoa implementation of pywebview sometimes renders the title as part of the window content as well as in the titlebar, due to the way the NSWindow/NSView components are integrated if not all window management is handled natively by your code.

Proposed fix : Do not set the title using create_window, and set it afterwards

For example :

import webview

def set_my_title(window):
   # window refers to the window object you created
   window.set_title("blah")

window = webview.create_window(
             "",  # empty title set for the webpage
             f"http://localhost:{port}",
             width=1400,
             height=900,
             min_size=(800, 600),
             on_top=False
)

webview.start(set_my_title, window)  # set title here
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you
  • Low reputation (1):
Posted by: snal