[WIP] Fix issue preventing Disney Plus from closing #34
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Public/castroix!34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "copilot/fix-disney-plus-close-issue"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix: Disney Plus Cannot Close After Opening ✅
Problem
After opening Disney+ (or any embedded browser service), users were unable to close it using the Escape or Ctrl+Q keyboard shortcuts. The browser view would remain open with no way to return to the main menu except by quitting the entire application.
Root Cause
When a BrowserView is created and covers the main window, keyboard events are captured by the BrowserView's webContents instead of the main window's renderer process. This meant the keyboard event handlers in
renderer.jsnever received the Escape or Ctrl+Q keypress events.Solution
Implemented global keyboard shortcuts using Electron's
globalShortcutAPI in the main process. These shortcuts work system-wide and intercept keys even when the BrowserView has focus.Changes Made
Technical Implementation
registerBrowserShortcuts()- Registers Escape and CommandOrControl+Q globallyunregisterBrowserShortcuts()- Cleans up registered shortcutscloseBrowserView()- Centralized helper that:createBrowserView()to:testGlobalShortcuts()to validate implementationTesting
Security Summary
No security vulnerabilities were discovered or introduced by this change. The implementation follows best practices:
User Impact
Users can now reliably close Disney+ and other embedded browser services using:
This fix applies to all embedded browser services (Netflix, Plex, Jellyfin, etc.), not just Disney+.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.