[Problem/Bug]: -webkit-app-region: drag causes severe window resize blocking when layout animations exist

Abierto
#5,798 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
web-dev
Área
desktop

Línea de trabajo

Start by reproducing the reported resize stall in a WebView2 window with -webkit-app-region: drag and layout animations, then compare with the host-side drag implementation described in the issue. The payload names no repository files or tests, so the first step is to identify the WebView2 component responsible for drag-region geometry updates. Done means live resizing no longer blocks on each intermediate drag-region recalculation.

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

Descripción

Summary

When using -webkit-app-region: drag together with CSS layout animations / transitions in WebView2, live window resizing (dragging window border) suffers from heavy blocking: window size stops updating for a while, then jumps to catch up with mouse. This is not ordinary frame drop; it blocks the native window sizing pipeline.

Reproduction steps
  1. Create a WebView2 window with custom titlebar.
  2. Mark titlebar element with style="-webkit-app-region: drag".
  3. Add layout animations / transform / expand-collapse transitions inside the page.
  4. Drag the window border continuously to resize.
Observed behavior
  • Window geometry update stalls during resize.
  • In our real test, the maximum blocking time of a single resize update reached ~453 ms.
  • The freeze happens only when -webkit-app-region: drag is active on animated elements.
  • After switching to our native window drag implementation (outside WebView CSS), the worst-case latency dropped to ~9.6 ms.
Expected behavior

The native window resize pipeline should not be blocked by internal web layout / animation work of drag regions.

Suggestion

Defer the layout calculation of -webkit-app-region: drag areas during live resizing.
Do not recalculate / recompute drag-region geometry on every intermediate resize tick.
Only update the drag region bounds after the resize operation finishes (on resize end).

Additional context

This issue blocks custom titlebar frameworks built on WebView2. For our project JadeView, we are forced to abandon -webkit-app-region: drag entirely and implement our own drag hit-test in host code to avoid this blocking bug.

Environment: Windows 11, latest WebView2 156.0.4314.42.

Lenguaje dominante
PowerShell
Estrellas
526
Forks
70
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 MicrosoftEdge/WebView2Feedback

Todos los issues de MicrosoftEdge/WebView2Feedback

Issues similares

Más issues de Desktop Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.