Skip to content

[Windows] WebView Navigated event is still called even after cancelling the Navigation.#28340

Merged
rmarinho merged 4 commits intodotnet:mainfrom
Tamilarasan-Paranthaman:fix-28303
Mar 27, 2025
Merged

[Windows] WebView Navigated event is still called even after cancelling the Navigation.#28340
rmarinho merged 4 commits intodotnet:mainfrom
Tamilarasan-Paranthaman:fix-28303

Conversation

@Tamilarasan-Paranthaman
Copy link
Copy Markdown
Member

Root Cause of the issue

  • On Windows platforms, the Navigated event is not being restricted like on other platforms. Since the NavigationCompleted event is still triggered from the platform's view, it is considered a failed event based on the IsSuccess boolean property, causing the Navigated event to be called with failure event details.

Description of Change

  • The issue has been addressed by restricting the Navigated event using the WebNavigationResult enum. The event is now triggered only when it is not in a Cancel state. This change resolves the issue and ensures consistency with how other platforms behave.

Issues Fixed

Fixes #28303

Tested the behaviour in the following platforms

  • iOS
  • Android
  • Windows
  • Mac

Screenshot

Before Issue Fix After Issue Fix
WebView-Navigated-Event-Before-Fix.mp4
WebView-After-Fix.mp4

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Mar 12, 2025
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @Tamilarasan-Paranthaman! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Mar 12, 2025
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/rebase

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review March 14, 2025 10:30
Copilot AI review requested due to automatic review settings March 14, 2025 10:30
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner March 14, 2025 10:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit c324b23 into dotnet:main Mar 27, 2025
128 checks passed
@rmarinho rmarinho added this to the .NET 9 SR6 milestone Mar 27, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 27, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman deleted the fix-28303 branch September 24, 2025 07:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-webview WebView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] WebView Navigated event is still called even after cancelling the Navigation

6 participants