Skip to content

[UWP] WebView2 freezes when <body contenteditable="true"> under Best Power Efficiency battery mode #5284

Open
@Aishwarya-Jeyaraj

Description

@Aishwarya-Jeyaraj

What happened?

Observing freeze in UWP applications using WebView2 when the HTML is set as contenteditable='true'.

The freeze is reproducible when the system is set to Best power efficiency mode, with the charger unplugged. Content length doesn't have to be large - the issue still occurs with minimal content in the editable body.

No freeze is observed in the WinUI 3 version of the app with the same content.

When the freeze occurs, the following entry is consistently logged in Event Viewer under Event ID 256 from source EdgeWebView:

The description for Event ID 256 from source EdgeWebView cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
if the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
[43352:32900:0626/154917.901:INFO:chrome\browser\extensions\extension_garbage_collector.cc:184] Garbage collection for extensions on file thread is complete.
The message resource is present but the message was not found in the message table

A screen recording clearly demonstrating the freeze during interaction has been attached.

WV2Freeze.mp4

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

137.0.3296.93

SDK Version

1.0.2849.39

Framework

WinUI2/UWP

Operating System

Windows 11

OS Version

10.0.22631

Repro steps

Setup (Required before launching the app):

  1. Change battery settings:
      - Set battery mode to Best power efficiency
      - Unplug the charger
  2. Keep the device in the set power state for 15–20 minutes.

Steps to reproduce:

  1. Create a UWP app
  2. Add a WebView2 control from Microsoft.UI.Xaml and load an HTML page with <body contenteditable="true"> - Content length doesn’t matter
  3. Run the app and interact with WebView2 repeatedly:
      - Select a few words or lines and press Ctrl + C / Ctrl + A
      - Scroll down and then scroll back to the top
      - Try typing in the editor
    4.Observe: The app freezes temporarily - Keystrokes do not appear for a few seconds and UI becomes unresponsive

Have attached a sample UWP project with a simple WebView2 setup to help reproduce the issue - WebView2FreezePOC.zip

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions