-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The reopen event is not triggered when upgrading to 0.84.0 #8168
Comments
This problem is still happening in latest version 0.85.0 friendly ping @rogerwang |
I found a seemingly working solution: do not use: nw.App.on("onreopen", () => {}) instead use: nw.App.onReopen(() => {}) I found inspiration in this comment: #7860 (comment). The website documentation does not mention this method for adding listeners. The Typescript compiler may generate an error message because the type definitions are outdated: declare namespace nw {
export interface App {
onReopen: {
addListener: (arg: any) => void
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Type
Before opening an issue, please search and see if it has already been raised.
Bug Report
Feature Request
Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
The reopen event is never triggered.
Expected/Proposed Behavior
Each time the user clicks the Mac OS Dock icon of the application, the reopen event should be triggered, allowing the application to decide how to handle this event. This is because sometimes the app is minimized and sometimes it's hidden, so it may require different logic.
Additional Info
Run
npm i
and start it withnpm start
, then follow these steps:rm -rf node_modules && npm install nw --nwjs_build_type=sdk && npm i
The text was updated successfully, but these errors were encountered: