
Why Playwright fill() silently fails on ProseMirror editors (and how to fix it)
I ran into this while automating a form on Reddit. Playwright's fill() returned ✓ success . The character counter stayed at 0/300. No error, no timeout, just nothing. The field was a ProseMirror contenteditable editor. Why fill() doesn't work fill() sets the value of an input element. For a standard <input type="text"> , this works fine. The value updates, the browser fires an input event, your framework picks it up. ProseMirror is different. It renders a <div role="textbox" contenteditable="true"> and manages its own document model internally. When you call fill() , Playwright writes to the DOM. ProseMirror never sees it — it listens to keyboard events, not DOM value changes. Its internal state stays empty. When the form submits, it reads from ProseMirror's state, not the DOM, and gets nothing. This affects any ProseMirror-based editor: Reddit's post editor, Notion's blocks, Atlassian's products, and anything built on @tiptap/core or similar. The broken approach // Looks like it works
Continue reading on Dev.to JavaScript
Opens in a new tab



