[Bug]: Firefox fires `cancel` on a file input before `change` when a FileChooser's `setFiles` is called (1.65.0)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- playwright, typescript
- 領域
- testing-qa
調査の方向性
Start by tracing how Firefox handles FileChooser.setFiles and dispatches file input events; the issue provides a JavaScript reproduction but names no source files or tests. Run the reproduction against Firefox and confirm the current event order. Done when cancel no longer fires before input and change for a programmatic file selection, while genuine cancellation behavior remains correct.
索引モデルが issue の本文から書いたものです。
説明
Version
1.65.0 (Firefox 159.0, revision 1572). Not in 1.64.1 (revision 1555).
Steps to reproduce
import { firefox } from 'playwright';
const browser = await firefox.launch();
const page = await browser.newPage();
page.on('console', (m) => console.log(m.text()));
await page.setContent(`<button onclick="
const i = document.createElement('input'); i.type = 'file';
for (const e of ['cancel', 'input', 'change']) i.addEventListener(e, () => console.log(e, i.files.length));
i.click();">open</button>`);
const [chooser] = await Promise.all([page.waitForEvent('filechooser'), page.click('button')]);
await chooser.setFiles('some-file.txt');
await page.waitForTimeout(1000);
await browser.close();
Expected behavior
As with 1.64.1, and with Chromium in 1.65.0:
input 1
change 1
Actual behavior
cancel 0
input 1
change 1
cancel arrives about 60 ms before input and change, with no files. Code that resolves a promise on the first of change and cancel takes the choice as cancelled. That's a common pattern for a file input that isn't attached to the document.
Additional context
A user choosing a file in Firefox gets no cancel, and the HTML spec fires cancel only when the selection is cancelled or unchanged. We pinned 1.64.1 for now.
Environment
macOS (arm64), Node.js 24.16.0, also on GitHub's macOS runners.
- 主要言語
- TypeScript
- スター
- 99.1k
- フォーク
- 6.8k
- 平均マージ
- 16時間 56分
- マージ済み PR(30日)
- 299
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/playwright のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/playwright#43998 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/playwright#43990 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/playwright#43999 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 69/100
microsoft/playwright#43996 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
microsoft/playwright#43995 ·
メンテナーはふだん 1 日以内に返信
microsoft/playwright の issue をすべて見る
似ている issue
-
code-quality good-first-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenRailAssociation/netzgrafik-editor-frontend#1481 ·
メンテナーはふだん 1 日以内に返信
-
bug implicit-state
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
area:models enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug frontend ui
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Recording drops clicks on links, filters and checkboxes that share a form with a search field対応中かも @columbia11 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Tencent/BrowserSkill#657 ·
メンテナーはふだん 1 日以内に返信