Placeholder does not disappear after typing in Safari/WebKit
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start by locating PlaceholderExtension and the dynamically injected selector described in the issue, then reproduce the behavior in Safari or a WKWebView while comparing Chrome. Done means both the emptyDocument and default placeholders disappear immediately after typing, without requiring a focus change or refresh.
索引モデルが issue の本文から書いたものです。
説明
What’s broken?
In Safari and WebKit based desktop applications, BlockNote's placeholders is not being cleared after text is started to be entered into a block or document. The document updates and the entered text persists correctly, but the placeholder is stilling being displayed inline beside the text until Safari or the application is refreshed. This affects both the emptyDocument placeholder and the default placeholder.
What did you expect to happen?
The empty document and default placeholder should disappear immediately when starting to type into a block in Safari and WebKit-based desktop frameworks as happens in Chrome. Where the placeholder disappears immediately after the first character is entered.
Steps to reproduce
- Setup/Create a BlockNote editor.
- Open the editor in Safari or a WKWebView based desktop application (I am using Electrobun, Tauri is probably the same).
- Focus an empty document and type anything. Empty editor placeholder text remains beside the entered text if set.
- Press Enter to create another block and type text. Default placeholder text remains beside the entered text.
- Repeat in Chrome. Both placeholders disappear immediately after typing.
BlockNote version
0.51.4
Environment
Safari 27.0 (22625.1.20.11.3), macOS 27.0 (26A5368g), Electrobun 1.18.1 (WKWebView), React 19.1.0
Additional context
I got Codex to investigate the bug and it returned the following notes:
BlockNote 0.51.4 injects placeholder rules from PlaceholderExtension using a selector shaped like:
.placeholder-selector-... .bn-block-content[data-is-empty-and-focused]:has(.ProseMirror-trailingBreak:only-child)::after
In Chrome, typing removes the placeholder immediately (::after changes from the configured string to none, and the empty/focused decoration is removed). In Safari/WebKit, the editor contains and persists the entered text while the generated placeholder pseudo-content remains visible. Changing focus causes it to disappear.
This strongly suggests a WebKit style-invalidation issue involving the dynamically injected :has(...)::after rule, rather than an editor-state or persistence failure. The behavior was reproduced directly in Safari and in a native WKWebView, with Chrome used as the working control.
Contribution
- I'd be interested in contributing a fix for this issue
Sponsor
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
- 主要言語
- TypeScript
- スター
- 10.2k
- フォーク
- 772
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 17
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TypeCellOS/BlockNote のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TypeCellOS/BlockNote#3098 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TypeCellOS/BlockNote#3073 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
TypeCellOS/BlockNote#3072 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TypeCellOS/BlockNote#2949 · コメント 1 件 ·
-
a11y
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
TypeCellOS/BlockNote#2855 ·
TypeCellOS/BlockNote の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
-
code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vercel/react-tweet#225 ·