Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit change event on uploadFile calls (puppeteer#5389)
In puppeteer 1.20.0, the following code emitted an alert: ``` const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch({args: ['--no-sandbox'], headless: false}); const page = (await browser.pages())[0]; await page.setContent(` <input type=file> <script> document.querySelector('input').addEventListener('change', () => { alert('Uploaded a file'); }); </script> `); const input = await page.waitForSelector('input[type="file"]'); await input.uploadFile(__filename); })(); ``` A bisection yielded 6091a34 as the commit that broke this. Emitting the change event as well seems to fix the problem.
- Loading branch information