Skip to content

Conversation

JulianGlueck
Copy link
Contributor

@JulianGlueck JulianGlueck commented Aug 22, 2025

This PR allows developers to disable the opening of potentially unwanted pop-up windows.

By default, Electron doesn't prevent sub-windows to be opened out of a window. This would for instance be the case if a user middle-clicks a link. This behaviour is potentially undesirable in a desktop application, as it enables the user to "break out" of a window.

To prevent additional windows from opening, this PR adds a suppressNewWindows() method that can be applied when opening a new window. It will prevent any pop-up windows being opened.

Laravel PR: NativePHP/laravel#685
Docs PR: NativePHP/nativephp.com#200

If there's anything you'd like me to tweak or improve in this PR, please let me know. 😊

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