[Beta]: Undo in an input inside a void runs the editor's undo instead of the input's
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start by reading packages/plitejs/src/react/editable/keyboard-input-strategy.ts, especially the interactive element key handling at the cited lines 492 and 611. Reproduce the issue in the editable-voids and embeds examples, then trace how ⌘Z and ⌘⇧Z are handled for inputs inside voids. Done means those shortcuts undo and redo the input edit while leaving editor history and focus unchanged.
索引モデルが issue の本文から書いたものです。
説明
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
NOT_ENOUGH_INFO
Summary
When focus is in a native input inside a void element, ⌘Z does not undo the input's own edit on Beta. On /examples/plite/editable-voids it undoes the last edit in the void's child editor instead and moves focus there. On /examples/plite/embeds it does nothing, so a deleted character in the video URL does not come back. On slatejs.org, ⌘Z in the same inputs undoes the input's edit.
Reproduction
Repro 1: /examples/plite/editable-voids, Chrome
- Open https://beta.platejs.org/examples/plite/editable-voids.
- Click the end of
A wise quote.in the child editor underTell us about yourself, and typealpha. - Click the Name input and type
a. - Press Shift+← and Backspace. Name is empty again.
- Press ⌘Z, then ⌘⇧Z.
⌘Z removes alpha from the child editor and moves focus into it. ⌘⇧Z adds alpha back. Name stays empty. On https://www.slatejs.org/examples/editable-voids, ⌘Z brings back a in Name, ⌘⇧Z removes it again, focus stays in Name and the child editor keeps alpha. On a fresh Beta page, where the child editor has no history yet, ⌘Z in Name leaves focus in Name.
Repro 2: /examples/plite/embeds, Chrome
- Open https://beta.platejs.org/examples/plite/embeds.
- Click the end of the video URL input under the video. It reads
https://player.vimeo.com/video/26689853. - Press Backspace. The input reads
…/2668985. - Press ⌘Z.
The input still reads …/2668985, and focus stays in it. On https://www.slatejs.org/examples/embeds, ⌘Z brings the 3 back.
Expected
⌘Z and ⌘⇧Z in an input inside a void act on that input, as on slatejs.org. The editor's history and focus stay as they are.
Actual
Beta runs its own undo for the key press. In repro 1 that undoes the child editor's edit and moves focus. In repro 2 the input's edit is not undone.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO - Repro 1: Chromium 152 in an agent's browser on 2026-10-21, and desktop Chrome in a second agent run. The recording uses headless Chromium 149 on macOS, driven by Playwright with real key presses, on 2026-10-24.
- Repro 2: Chrome 155 on macOS on 2026-10-20, confirmed by natamox by hand the same day. The recording uses headless Chromium 149 on 2026-10-24.
Caveat
- Nobody has traced the cause. A suspect is the key handling for interactive elements inside the editor in
packages/plitejs/src/react/editable/keyboard-input-strategy.ts(lines 492 and 611 onnext): it looks like ⌘Z there runs the editor's undo and callspreventDefault, which also blocks the input's native undo. This is a reading of the code, not checked with a breakpoint. - The embeds example's URL input is written the same way as Slate's, and the input stays the same DOM node after the update, so the difference is in the editor's event path.
- Neither example's outer editor undo is part of this issue. Slate's embeds example has no history either.
Evidence
- Repro 1: headless Chromium recording, 46 seconds, with an English step panel and a readout box drawn by the test script that shows the Name value, the quote line and where focus is. Beta runs first. At 0:11 ⌘Z removes
alphaand focus moves to the child editor, and at 0:13 ⌘⇧Z puts it back. From 0:23 slatejs.org runs the same steps, and at 0:34 ⌘Z brings backain Name. - Repro 2: headless Chromium recording, 33 seconds, in the same layout. On Beta, Backspace at 0:04 deletes the
3, and ⌘Z at 0:07 leaves the input at…/2668985. From 0:16 slatejs.org runs the same steps, and ⌘Z at 0:23 restores…/26689853.
Repro 1 — Chromium, /examples/plite/editable-voids
https://github.com/user-attachments/assets/91c856a0-2eaf-4f1f-97b5-1120e05fa4d9
Repro 2 — Chromium, /examples/plite/embeds
https://github.com/user-attachments/assets/ba6ce8b8-89fd-41ae-a6f0-b483dcbafb82
- 主要言語
- TypeScript
- スター
- 16.6k
- フォーク
- 993
- 平均マージ
- 20時間 2分
- マージ済み PR(30日)
- 62
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
udecode/plate のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the link対応中かも @zbeyens が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
udecode/plate#5314 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
[Beta]: The docs Demo example page starts with an empty editor対応中かも @natamox が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
udecode/plate#5308 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Equal-Vote/bettervoting#1754 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
Doist/todoist-sdk-typescript#740 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
privatenumber/cleye#47 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P1
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
steipete/oracle#614 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MoonshotAI/kimi-code#4591 ·
メンテナーはふだん 1 日以内に返信