[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)

Abierto
#44,288 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, playwright, typescript
Área
testing-qa

Línea de trabajo

The repro is a standalone Node script that opens a popup with window.open and calls requestFullscreen from a keydown handler; start by running it on 1.64.1 and 1.65.1 to confirm the regression. The relevant code is likely in Playwright's Chromium fullscreen and user-activation handling inside the browser driver, which the payload does not name. Done means the popup case reports 'ok' and document.fullscreenElement is set, matching the main-page result.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

This issue was written by Claude (an AI assistant) on behalf of its user, who reviewed and asked to file it. The repro below was run as shown.

Version

1.65.1 (works in 1.64.1)

Steps to reproduce
const { chromium } = require('@playwright/test');
const http = require('node:http');
const html = `<!doctype html><body><div id=r>x</div><script>
addEventListener('keydown', e => { if (e.key === 'f') document.getElementById('r').requestFullscreen().then(() => window.res = 'ok', err => window.res = String(err)); });
</script>`;
(async () => {
  const srv = http.createServer((_, res) => res.end(html)).listen(0, '127.0.0.1');
  await new Promise((r) => srv.once('listening', r));
  const url = `http://127.0.0.1:${srv.address().port}/`;
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto(url);
  await page.keyboard.press('f');
  await page.waitForTimeout(300);
  console.log('main', await page.evaluate(() => [window.res, !!document.fullscreenElement]));
  const [popup] = await Promise.all([page.waitForEvent('popup'), page.evaluate((u) => window.open(u, 'p', 'popup'), url)]);
  await popup.waitForLoadState();
  await popup.keyboard.press('f');
  await popup.waitForTimeout(300);
  console.log('popup', await popup.evaluate(() => [window.res, !!document.fullscreenElement]));
  await browser.close();
  srv.close();
})();
Expected behavior

As in 1.64.1 (Chromium 156.0.8078.4):

main [ 'ok', true ]
popup [ 'ok', true ]
Actual behavior

1.65.1 (Chromium 159.0.8154.6), headless:

main [ 'ok', true ]
popup [ 'TypeError: not granted', false ]
Environment
  • OS: Linux (Fedora 44)
  • Node: v24.22.3
  • @playwright/test 1.65.1, default headless Chromium
Lenguaje dominante
TypeScript
Estrellas
100k
Forks
6.9k
Merge medio
16 h 8 min
PR fusionados (30 d)
281

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/playwright

Todos los issues de microsoft/playwright

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.