Skip to content

fix(apple): report same-document web view navigation - #1654

Merged
houko merged 1 commit into
mainfrom
fix/apple-webview-navigation-state-113
Nov 21, 2026
Merged

houko merged 1 commit into
mainfrom
fix/apple-webview-navigation-state-113

Conversation

@houko

@houko houko commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Report WKWebView URL, history and title changes through OnNavigationStateChange on macOS and iOS, including updates within the current document.
  • Coalesce property observations into a changed snapshot. The navigation delegate reports the start and finish of full loads, and a title WebKit supplies later gets a separate state change.
  • Remove the observers when the view closes. Document platform coverage alongside the Linux implementation already on main.

Verification on bc5bdbaf1

  • Rebased onto main at 5cdbc5e93, preserving the merged custom scheme handling and WebView accessibility label binding.
  • The native WebView suite passed on AppKit and an iPhone 17 simulator running iOS 27.0. It covers push and replace state, fragments, back and forward history, and title changes. The full-load fixture observes exactly one loading state and one finished state.
  • A temporary native probe passed on both platforms. An app-owned scheme received the GET method and custom request header, returned an HTML response, and published a separate navigation callback when JavaScript updated the title from the delivered body.
  • go tool nsgo check -target macos,ios,ios_simulator -jobs 3 ./internal/platform/apple passed for both macOS architectures, iOS and iOS Simulator. The Apple cancellation and built-in scheme cases, the core scheme and access cases, and the NSGo skill test passed.
  • Before this change, the original macOS regression reproduced the missing same-document navigation callback after history.pushState().

Refs #113. Windows navigation state is tracked separately in #1661.

@github-actions github-actions Bot added documentation Improvements or additions to documentation macOS iOS core bug Something isn't working size/S labels Nov 21, 2026
@houko
houko force-pushed the fix/apple-webview-navigation-state-113 branch 2 times, most recently from 8607d9c to ab32073 Compare November 21, 2026 17:58
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 21, 2026
@houko
houko force-pushed the fix/apple-webview-navigation-state-113 branch from ab32073 to bc5bdba Compare November 21, 2026 19:02
@houko
houko merged commit a73ccc2 into main Nov 21, 2026
10 of 22 checks passed
@houko
houko deleted the fix/apple-webview-navigation-state-113 branch November 21, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working conflict Conflicts with the base branch; resolve it first core documentation Improvements or additions to documentation iOS macOS size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant