MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: If I close the page from which a download was started, I no longer receive `StateChanged` events for that download.
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Problem:
If I close the page from which a download was started, I no longer receive StateChanged events for that download.
Scenario:
In my application, I have several WebView2 pages open.
I start a download from one of these pages, and I monitor download events to track if downloads are stopped, canceled, or completed (using add_DownloadStarting, ICoreWebView2DownloadOperation, and add_StateChanged).
Issue:
If I close the page where the download was initiated, the download continues in the background because other pages remain open. However, I stop receiving any StateChanged events for the ongoing download(s). This is not the expected behavior, since the download operation (ICoreWebView2DownloadOperation) does not appear to depend on any particular WebView2 page.
As a result, monitoring downloads with add_DownloadStarting and add_StateChanged seems to only work reliably when there is a single page open. When multiple pages are open, closing the initiating page prevents further state updates for active downloads.
Expected Behavior:
StateChanged events for downloads should continue to be received even after the initiating page is closed, as long as the download is still in progress and other WebView2 pages remain open.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the scenario with multiple WebView2 pages, using add_DownloadStarting, ICoreWebView2DownloadOperation, and add_StateChanged while closing the initiating page. Done means StateChanged events continue for an active background download while another page remains open.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100