Description
Issue Type
- Bug Report
- Feature Request
- Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
After using nw.Window.get().toggleFullscreen() to enter and exit fullscreen, the window is behaving unexpectedly. There are 2 symptoms:
-
event
document.onkeydown
stops being triggered after any key is pressed. This can be worked around by pressing tab key and then the event starts being triggered correctly again. The issue can be also verified by pressing any other keys than tab, e.g. arrows or letters (even 'f' stops working) - the application will issue 'error' sound like as if you reach end of some input form and try to type further. -
black line appears on the bottom of the screen after exiting fullscreen. see attachments
Symptom 1) happens 9 out of 10 times the application is launched.
Symptom 2) happens completely randomly, i.e. 5 times app is launched, no black stripe. 5 times launched later on, the symptom is there.
Before entering fullcsreen mode:
After exiting fullscreen mode:
Expected/Proposed Behavior
- Same behavior all the time
- Fullscreen toggle should have no effect on
onkeydown
event. - Black stripe should not appear after exiting fullscreen.
Additional Info
This is a regression. Until v65.1 this issue was not present. It was introduced in v66.0
Attaching 4 line script to reproduce the issue. See repro link.
- Operating System: macOS 12.6
- NW.js Version: v66.0 - v69.1 - tested all releases in between. Last release which works correctly is v65.1
- Repro Link: https://gist.github.com/toxygen/26e55edfcb1a80e8ef207a912429db5a