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

'NW2' win.blur() does not fire correctly #7327

Closed
prominentdetail opened this issue Jan 20, 2020 · 6 comments
Closed

'NW2' win.blur() does not fire correctly #7327

prominentdetail opened this issue Jan 20, 2020 · 6 comments
Labels

Comments

@prominentdetail
Copy link

prominentdetail commented Jan 20, 2020

NWJS Version : 0.43.6
Operating System : windows 10

Expected behavior

console.log(0); should run when clicking outside the window onto another app.

Actual behavior

it doesn't.. instead, you have to minimize the window and then restore the window to get the code to fire.

How to reproduce

run the attached app.. click outside the main window onto another application, and then check the console.
Then minimize the window, and then restore it. After restoring, check the console to see the code fire. :( I need it to fire at the correct time.
nwjsTest2.zip

if I put "--disable-features=nw2" then it will work as it should.

@prominentdetail prominentdetail changed the title win.blur() does not fire correctly 'NW2' win.blur() does not fire correctly Jan 20, 2020
@prominentdetail prominentdetail changed the title 'NW2' win.blur() does not fire correctly 'NW2' win.blur() does not fire correctly (but it will with: "--disable-features=nw2") Jan 20, 2020
@rogerwang rogerwang added the nw2 label Jan 21, 2020
@rogerwang rogerwang changed the title 'NW2' win.blur() does not fire correctly (but it will with: "--disable-features=nw2") 'NW2' win.blur() does not fire correctly Jan 21, 2020
@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@prominentdetail
Copy link
Author

prominentdetail commented Jan 21, 2020

@rogerwang
I tested it with the latest nightly build (http://dl.nwjs.io/live-build/nw44/20200121-162000/5bc7c9caf/v0.44.0/), and it still doesn't work.
If you click off onto another application (windows explorer for example), the console won't print the 0.
However, if I use the "--disable-features=nw2" it will work.

@prominentdetail
Copy link
Author

here is an attached gif showing the problem.
bugblur

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@prominentdetail
Copy link
Author

prominentdetail commented Jan 22, 2020

hmm.. well.. it still isn't working exactly right.. The "tilesetWindow.setAlwaysOnTop(false);" isn't being applied quickly enough or something. I attached a gif that shows the inconsistency..
window
It should make the secondary window go behind the other applications, but most of the time it doesn't. It's strange that whenever I click into a chrome window (but not the tab) it will do it correctly.
@rogerwang

@rogerwang
Copy link
Member

Since the blur event is fixed, please file another issue if you think setAlwaysOnTop is not right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants