Skip to content

Add WKUIDelegate to handle JavaScript alerts and confirms#65

Open
shawntz wants to merge 1 commit intostagingfrom
bf/ui-webview-delegate
Open

Add WKUIDelegate to handle JavaScript alerts and confirms#65
shawntz wants to merge 1 commit intostagingfrom
bf/ui-webview-delegate

Conversation

@shawntz
Copy link
Copy Markdown
Owner

@shawntz shawntz commented Jan 11, 2026

Description

WKWebView requires a UI delegate to handle alert() and confirm() dialogs. Without it, these calls silently fail - causing the connection remove button to do nothing since confirm() returned undefined.

WKWebView requires a UI delegate to handle alert() and confirm()
dialogs. Without it, these calls silently fail - causing the
connection remove button to do nothing since confirm() returned
undefined.
@shawntz shawntz self-assigned this Jan 11, 2026
Copilot AI review requested due to automatic review settings January 11, 2026 06:56
@shawntz shawntz added the bug Something isn't working label Jan 11, 2026
@shawntz shawntz changed the base branch from main to staging January 11, 2026 06:57
Copy link
Copy Markdown

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.

Pull request overview

This PR adds WKUIDelegate support to enable JavaScript alert() and confirm() dialogs in the WKWebView, fixing a bug where the connection remove button was non-functional because confirm() calls were silently failing.

Changes:

  • Added WebViewUIDelegate class implementing WKUIDelegate protocol to handle JavaScript alerts and confirms
  • Implemented alert and confirm panel handlers using NSAlert
  • Initialized and assigned the UI delegate to the webView instance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants