Skip to content
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

win.requestAttention() doesn't work in NW.js 0.50.x #7659

Open
AshleyScirra opened this issue Jan 19, 2021 · 5 comments
Open

win.requestAttention() doesn't work in NW.js 0.50.x #7659

AshleyScirra opened this issue Jan 19, 2021 · 5 comments
Labels
bug has-min-repro Has a minimum reproduction

Comments

@AshleyScirra
Copy link

AshleyScirra commented Jan 19, 2021

NWJS Version : reproduces in both 0.50.0 and 0.50.3
Operating System : Windows 10 64-bit

Expected behavior

The window 'requestAttention' method should work.

Actual behavior

It doesn't seem to work in 0.50.x. It logs a console error: Unchecked runtime.lastError: The context from which the function was called did not have an associated app window.

How to reproduce

Minimal repro:
win-requestattention.zip

Click the button. It just runs: nw.Window.get().requestAttention(3);

@sysrage
Copy link

sysrage commented Nov 16, 2021

I am also seeing this behavior with NW.js 0.58.0. This fails in all of the following scenarios:

nw.Window.open('page.html', (newWindow) => {
  newWindow.requestAttention(true);
});
nw.Window.get().requestAttention(true);
nw.Window.get().requestAttention(false);
nw.Window.get().requestAttention(3);

These all fail with the same error @AshleyScirra mentioned:

Unchecked runtime.lastError: The context from which the function was called did not have an associated app window.

@sysrage
Copy link

sysrage commented Nov 16, 2021

@rogerwang I hate to ping you but this sure looks like it'd be an easy fix and has been open for almost a year. Any input?

@sysrage
Copy link

sysrage commented Mar 10, 2022

@rogerwang This is still broken with 0.62.0.

@ayushmanchhabra ayushmanchhabra added bug has-min-repro Has a minimum reproduction labels Jan 13, 2023
@deltapath-eric
Copy link

seem i got the same error on 0.82.0
image

@ssnangua
Copy link

The problem still exists in 0.85.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug has-min-repro Has a minimum reproduction
Projects
None yet
Development

No branches or pull requests

5 participants