MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Navigate to string then to uri, IME will not work and page will close

Open
#1,885 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
When WebView2 navigated to a string and get focused, and then navigate it to an uri, users using IME can't type anything and page will close after two seconds or longer. See this minimum project:
WebView2IMEPageClose.zip

Version
SDK: WinUI 1.0 prerelease2
Runtime: 94, 95
Framework: WinUI in Desktop
OS: Windows 11

Repro Steps

  1. Run the project above. It first navigate webview to a string which has a textarea that you can input something.
  2. Click in the textarea to make the webview get focused. This step is important. Without webview getting focused once, you can't reproduce the problem.
  3. Typing something in the textarea using IME, now everything is OK.
  4. Click the button above the webview, it navigate webview to a uri pointing to a html which contains the same code to the previous string (actually the string is read from this file)
  5. Now click in the textarea and try to type something using IME, note that no letters will appear in the textarea and after about two seconds, the page is very likely to close without any reason.

Screenshots
动画

The problem happens when webview's source changes from string to uri. If its sources are always string or always uri, there will be no problem. But since developers may use a same webview to display strings and uris, the problem worth to be fixed.

AB#36927816

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the attached WebView2IMEPageClose.zip minimum project and follow the five reproduction steps, especially focusing the WebView before changing its source from a string to a URI. Compare IME input and page lifetime before and after navigation. Done means the URI-loaded textarea accepts IME input and the page remains open.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.