You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Links in Monaco editor content were opening within the WebView instead of in an external browser.
Root Cause
The OnNavigationStarting event handler in SharpPad.Desktop/Views/MainWindow.axaml.cs:20 was empty. When users clicked links in Monaco editor content, the WebView would navigate to those URLs internally instead of opening them in the default browser.
Solution Implemented
I've implemented the OnNavigationStarting handler to:
Detect external links: Compare the navigation URL with the app's base URL (localhost:port)
Cancel internal navigation: Prevent the WebView from loading external URLs
Open in default browser: Use Process.Start with UseShellExecute to open links in the system's default browser
Activity
claude commentedon Oct 17, 2025
Claude finished @gaoconggit's task —— View job •
claude/issue-62-20251017-1129• Create PR ➔Analysis Complete
Issue: Links in Monaco editor content were opening within the WebView instead of in an external browser.
Root Cause
The
OnNavigationStartingevent handler inSharpPad.Desktop/Views/MainWindow.axaml.cs:20was empty. When users clicked links in Monaco editor content, the WebView would navigate to those URLs internally instead of opening them in the default browser.Solution Implemented
I've implemented the
OnNavigationStartinghandler to:Process.StartwithUseShellExecuteto open links in the system's default browserChanges Made
File Modified:
SharpPad.Desktop/Views/MainWindow.axaml.csThe handler now:
Uri.TryCreateto safely parse both URLsTesting
Next Steps
Please review and test the fix:
--- |
Fix: Open external links in default browser instead of WebView