Skip to content

WebView: drop setEditableFocusActive + responder-chain forwarding - #30

Closed
jakepenn wants to merge 1 commit into
minimal_masterfrom
webview-drop-editable-focus-active
Closed

WebView: drop setEditableFocusActive + responder-chain forwarding#30
jakepenn wants to merge 1 commit into
minimal_masterfrom
webview-drop-editable-focus-active

Conversation

@jakepenn

Copy link
Copy Markdown
Member

Summary

Consumers (minimal_core) have switched to a JS-side keyboard triage that routes host-bound keys through a custom bridge call on both platforms, so the JUCE-side editableFocusActive + WKWebView responder-chain forwarding patch is no longer driving anything.

Removed:

  • WebBrowserComponent::setEditableFocusActive public API
  • Platform::setEditableFocusActive virtual + Windows/macOS overrides
  • Auto-registered __juceSetEditableFocusActive native function
  • macOS WKWebView keyDown:/keyUp: overrides that forwarded to next responder
  • editableFocusActiveMemberName ivar plumbing and helper accessors
  • The editableFocusActive check inside the macOS performKeyEquivalent: override (the original JUCE Cmd-X/C/V/A clipboard handling stays)

Net result is reverting the macOS half of #26 (WebView: forward keys to host responder chain by default), the API + native-function plumbing it added in WebBrowserComponent.{h,cpp}, and the corresponding mac.mm changes. macOS now behaves like upstream JUCE for keyboard events — WKWebView dispatches to the DOM, the embedded JS does the triage, and the consumer-side bridge handles host forwarding via a synthesised NSEvent that bypasses WKWebView.

Test plan

  • Plugin in DAW (macOS): typing into preset search works; Space transport reaches the DAW via the new JS triage path; Cmd-X/C/V/A still work in DOM inputs (JUCE's original performKeyEquivalent: clipboard handling)
  • Plugin in DAW (Windows): same as before (existing Windows path unaffected)
  • Standalone Windows / macOS: no regressions

🤖 Generated with Claude Code

Consumers (minimal_core) have switched to a JS-side keyboard triage that
routes host-bound keys through a custom bridge call on both platforms,
so the JUCE-side editableFocusActive + WKWebView responder-chain
forwarding is no longer driving anything.

Removed:
- WebBrowserComponent::setEditableFocusActive public API
- Platform::setEditableFocusActive virtual + Windows/macOS overrides
- Auto-registered __juceSetEditableFocusActive native function
- macOS WKWebView keyDown:/keyUp: overrides that forwarded to nextResponder
- editableFocusActiveMemberName ivar plumbing and helper accessors
- The editableFocusActive check inside the macOS performKeyEquivalent:
  override (the original JUCE Cmd-X/C/V/A clipboard handling stays)

Net result is reverting the macOS half of "WebView: forward keys to host
responder chain by default" (0f0a85e), the API + native-function
plumbing it added in WebBrowserComponent.{h,cpp}, and the corresponding
mac.mm changes. macOS now behaves like upstream JUCE for keyboard
events — WKWebView dispatches to the DOM, the embedded JS does the
triage, and the consumer-side bridge handles host forwarding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jakepenn

Copy link
Copy Markdown
Member Author

Reverting: keeping the WKWebView responder-chain forwarding + setEditableFocusActive API on macOS. The consumer-side symmetric approach this was paired with introduces a static keyCode translation gap on Mac that's strictly worse than the responder-chain forwarding's transparent passthrough.

@jakepenn jakepenn closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant