some Window events won't fire if you open remote url
See original GitHub issueNWJS Version : nwjs-sdk-v0.40.0-win-x64 Operating System : Windows 7
Expected behavior
Events like resize, move or loaded of Window should be emitted on all windows every time the event happens.
Actual behavior
Events are emitted only in window with local file (like test.html). Events aren’t emitted if you open remote url (like http://example.com).
How to reproduce
main.js
nw.Window.open('test.html', {}, function(win) {
win.on("resize", function(w, h) {
win.window.console.log("w, h", w, h);
});
});
nw.Window.open('http://example.com', {}, function(win) {
win.on("resize", function(w, h) {
win.window.console.log("w, h", w, h);
});
});
test.html
test
package.json
{
"name": "eventstest",
"main": "main.js"
}
The Window with test.html emits the resize event every time you resize it. The Window with http://example.com doesn’t. Same behavior can be observed with some other events.
For example the loaded event was working fire in version nwjs-sdk-v0.37.4-win-ia32, but it’s emitted only sometimes in windows with remote url and nwjs-sdk-v0.40.0-win-x64.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Unable to Access Event Viewer on a Remote Computer FIX ...
Unable to Access Event Viewer on a Remote Computer FIX [2022] If you are unable to access Event Viewer on a remote computer...
Read more >SP2013 Remote Event Receivers won't fire in on-premises ...
I have been trying for nearly a week now to get a remote list item event receiver to fire in SP2013. I have...
Read more >JavaScript event window.onload not triggered - Stack Overflow
In my case, I've used dynamic HTML, populating inside document via win = window.open("about:blank","",""); win.document.write(htmlcontent); . But my javascript ...
Read more >How to resolve common problems with Windows Remote ...
This troubleshooting guide aims to help in ruling out some of the most common causes for poor functionality.
Read more >How To Handle DOM and Window Events with React
In JavaScript apps using the React front-end library, you can use ... To demonstrate this, you will start by making your validating input....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good to know that. Closing this issue for now and please file a new one of the window object issue.
@rogerwang
It looks like that there are still some issues with the “close” event on windows with remote url. I’m having a problem receiving the “close” event under the NW2 mode (it works if I use --disable-features=nw2).
The breaking point is the 0.42.4 version where the NW2 mode has been introduced. Should I create a new issue for this problem?
Files to reproduce this issue:
issue9.zip
closing both windows should produce a message in the log.txt, but it only does for the local file