[Beta]: On Android Chrome, Copy after typing writes nothing to the clipboard, so Paste inserts the previously copied word
メンテナーはふだん 1 日以内に返信
@natamox がすでに取り組んでいます。
2026年10月27日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start with the Android Chrome reproduction on /examples/plite/huge-document, then read packages/plitejs/src/react/editable/clipboard-input-strategy.ts at applyEditableCopy and packages/plitejs/src/dom/plugin/dom-clipboard-runtime.ts at writeDOMSelectionData and writeDOMRangeData. Check whether the model selection matches the browser selection when the second copy event fires after typing, and trace whether clipboard data is written. Done means copying cognatus after typing replaces the clipboard word on Android Chrome; keep the separate paste duplication bug #5262 out of scope.
索引モデルが issue の本文から書いたものです。
説明
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
NOT_ENOUGH_INFO
Summary
On /examples/plite/huge-document in Android Chrome, after a few characters are typed in the editor, a long press on another word and Copy leave the clipboard unchanged. Paste then inserts the word copied before, not the new one. On slatejs.org the same steps copy and paste the new word.
Reproduction
Repro 1: /examples/plite/huge-document, Android Chrome
The first block of the editor is the heading Suppellex a cognatus arca aliquam audentia..
- Open https://beta.platejs.org/examples/plite/huge-document.
- Tap
ConfigurationandStatisticsabove the editor to fold those panels, so the keyboard does not cover the text. - Tap the end of the first block.
- Long-press
aliquamand tap 复制 (Copy). - Tap the end of the first block, and type
你好with pinyin (nihao). - Long-press
cognatusand tap 复制 (Copy). - Tap the end of the first block, long-press there and tap 粘贴 (Paste).
In step 6 the long press selects cognatus, and the menu offers 复制 (Copy) as usual. In step 7 Beta pastes aliquam, the word from step 4, and the block ends 你好aliquamaliquam. The paste also goes in twice. That is a separate Android paste bug, #5262, and this issue is only about which word is pasted. On https://www.slatejs.org/examples/huge-document the same steps paste cognatus, and the block ends 你好cognatus.
The agent also logged the page's clipboard events. The first copy wrote text/plain, text/html and the editor's own fragment to the clipboard. The second copy fired a copy event while the browser's selection in the page was cognatus, but no data was written.
The same run found that the second copy works when nothing is typed between the two copies, and that typing English letters in step 5 breaks it the same way as pinyin. Copy also works in desktop Chrome. These variants were not recorded.
Expected
Copy writes the word that is selected when Copy is tapped, so Paste inserts cognatus, as on slatejs.org.
Actual
The copy event fires, but nothing is written. The clipboard still holds aliquam, and Paste inserts it.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO - Device: Xiaomi 14, Android 16, Chrome 154, WeType pinyin keyboard in its 9-key layout. An agent drove natamox's real phone on 2026-10-23 (PT), with slatejs.org as the reference. This was not a test by hand, and nobody has retested it by hand.
- Only /examples/plite/huge-document was tested. Nobody has tried these steps on iPhone or iOS Safari.
Caveat
- Nobody has traced the cause. From a reading of the code on
next,applyEditableCopy(packages/plitejs/src/react/editable/clipboard-input-strategy.ts:330) callspreventDefaulton the copy event, then writes the clipboard from the editor's model selection throughwriteDOMSelectionData(packages/plitejs/src/dom/plugin/dom-clipboard-runtime.ts:499).writeDOMRangeDatareturns without anysetDatacall when that selection is collapsed and not on a void (dom-clipboard-runtime.ts:539). If the model selection is still the collapsed caret left by typing, the page writes nothing, and Chrome's own copy has already been blocked. - That the long-press selection did not reach the editor's model is an inference from the event log:
copyfired andsetDatawas called 0 times. Nobody read the model selection at that moment.
Evidence
- Repro 1: screen recording from the phone, 42 seconds, with an English step panel beside it. The keyboard's suggestion row is blurred. At 0:08
aliquamis selected and the menu shows 复制 (Copy). By 0:21你好is committed at the end of the first block. At 0:23cognatusis selected with the same menu, and the selection clears at about 0:26 when Copy is tapped. At 0:32 the long press at the end shows 粘贴 (Paste), and at 0:37 the block ends你好aliquamaliquam. The red note at step 7 of the panel comes from the event log, not from anything on screen. The pasted word is the oldaliquam; that it goes in twice is #5262, and a gray note in the panel says so from 0:38. - Repro 1 reference: slatejs.org with the same steps, 55 seconds, in the same layout. At 0:07
aliquamis selected, by 0:24你好is committed, and at 0:26cognatusis selected. At 0:50 Paste putscognatusafter你好, once.
Repro 1 — Android Chrome, /examples/plite/huge-document
https://github.com/user-attachments/assets/a05ad4e0-551f-4c46-9c17-24bd3497e1a2
Repro 1 reference — Android Chrome, slatejs.org/examples/huge-document
https://github.com/user-attachments/assets/08b908d4-28b3-4665-b4f0-a5fbf08ffdec
- 主要言語
- TypeScript
- スター
- 16.6k
- フォーク
- 993
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 61
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
udecode/plate のほかの issue
-
難易度 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 が今日担当しました。 オープン
難易度 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 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
udecode/plate#5308 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
calcite-ui-icons enhancement impact - p3 - not time sensitive needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Esri/calcite-design-system#15467 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
diegosouzapw/OmniRoute#18390 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
guilhermerodz/input-otp#157 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
davidjerleke/embla-carousel#1414 ·
メンテナーはふだん 4 日以内に返信