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

Incorrect handling of borders when resizable is false #7521

Closed
sysrage opened this issue Jul 16, 2020 · 4 comments
Closed

Incorrect handling of borders when resizable is false #7521

sysrage opened this issue Jul 16, 2020 · 4 comments
Assignees
Labels

Comments

@sysrage
Copy link

sysrage commented Jul 16, 2020

NWJS Version : 0.47
Operating System : Windows 10 18363.900

Expected behavior

When a window's resizable property is set to false, the window frame/border/etc. should not start showing black outside borders and other odd artifacts.

Actual behavior

When resizable is set to false, windows are incorrectly gaining an outer black border on the sides and bottom. They're also gaining a 'border' between the titlebar and the window content which causes several issues. If you mouseover the close button, the button is highlighted red (as expected). When moving the mouse away, the bottom 'border' remains red. This also results in the titlebar being "too short" when content is covering the "top border".

image

image

How to reproduce

Set resizable to false for any window, either through the window options when opening it or by using setResizable(). Easiest reproduction:

  1. Launch nw.exe (SDK build) with no script/HTML.
  2. Open console and run: window.nw.Window.get().setResizable(false);
  3. Immediately observe the outer black border and incorrect lighter-grey top border.
  4. Mouseover the close button to observe the red being 'stuck' in the incorrect top border.
@sysrage
Copy link
Author

sysrage commented Jul 16, 2020

This appears to have been broken in version 0.42.4 of NW.js. I can reproduce this issue with 0.42.4 but not with 0.42.3.

@sysrage
Copy link
Author

sysrage commented Jul 16, 2020

This also does NOT occur when running NW.js 0.47 with --disable-features=nw2. Adding as a blocking bug for removing NW1 (#7230 ).

@rogerwang
Copy link
Member

This is fixed in git and available in the nightly build.

@sysrage
Copy link
Author

sysrage commented Jul 30, 2020

Thanks! I've verified that this fixes the borders as reported in this bug. Unsure if you're leaving bugs open until an official release, but this can be closed.

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

3 participants