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

Window and modal boxes features changed witn nw2 enabled #7217

Closed
qbroker opened this issue Nov 15, 2019 · 14 comments
Closed

Window and modal boxes features changed witn nw2 enabled #7217

qbroker opened this issue Nov 15, 2019 · 14 comments
Labels

Comments

@qbroker
Copy link

qbroker commented Nov 15, 2019

======== TEMPLATE BUG FORM ========

NWJS Version : 0.42.4
Operating System : Linux Mint 18.3 Cinnamon 3.6.7, kernel 4.15.0-66-generic

Expected behavior

  1. Window resizing with the mouse cursor on the edged of the window is possible,
  2. The window opens in the center of the screen,
  3. Modal dialog boxes boxes open in the center of the screen.

Actual behavior

  1. Window resizing with the mouse cursor is not possible,
  2. The window does not open in the center of the screen, it is shifted to left,
  3. Modal dialog boxes open at the top center of the screen.

How to reproduce

When "chromium-args" is set to "--disable-features=nw2", the listed three items show expected behavior, set to "--enable-features=nw2" gives the actual behavior.

Have a nice day, Okido

@Luzzifus
Copy link

Window resizing with the mouse cursor is not possible

To elaborate on that, resizing is only not possible (at least for me), when the window is frameless.

@DimPaDev
Copy link

I can confirm this bug with the latest version too (0.42.5) , Hopefully it will be fixed soon , I cant enable nw2 features in my apps with frameless windows because of this.

@rogerwang rogerwang added the nw2 label Nov 22, 2019
@cyantree
Copy link

cyantree commented Dec 9, 2019

I experience similar problems with nw2 and 0.42.6. In my case the window state won't be stored and restored when specifying an id. Maybe this is related to your findings.

@rogerwang Should I open a separate issue for this?

@qbroker
Copy link
Author

qbroker commented Jan 1, 2020

NWJS Version : 0.43.3
Operating System : Linux Mint 18.3 Cinnamon 3.6.7, kernel 4.15.0-66-generic
I can confirm that with "chromium-args" set to "--enabled-features=nw2" the behavior is:

  1. Window resizing with the mouse cursor on the edged of the window is possible, the handles appear, solved
  2. The window opens in the center of the screen, with "window.position": "center" in package.json the window is centered, solved
  3. Modal dialog boxes boxes open in the center of the screen, dialog boxes open at the top of the screen, not solved

Have a nice day, Okido

@cyantree
Copy link

cyantree commented Jan 1, 2020

Yes, 0.43.3 also fixed resizing for my. However it didn't fix storing/restoring the window state.

@rogerwang
Copy link
Member

@nwOkido could you provide a sample for Modal dialog boxes?

@qbroker
Copy link
Author

qbroker commented Jan 2, 2020

NWJS Version : 0.43.3
Operating System : Linux Mint 18.3 Cinnamon 3.6.7, kernel 4.15.0-66-generic
Example is in the zip, nw.js SDK files are in the modal-example folder, the file in /data is the target referenced in package.json.
2020-01-02-modal-example.zip

Have a nice day, Okido

@rogerwang
Copy link
Member

I started your sample, but didn't find any 'edit' button as described in the instruction.
Screen Shot 2020-01-04 at 3 56 18 PM

@qbroker
Copy link
Author

qbroker commented Jan 4, 2020

In a clean install during the first load the software "thinks" that it is loaded over http while it actually is loaded form the system, depending on this origin a different view template is loaded, this is something that I need to fix.
If you click Reload in the menu on the right the edit button will become visible and you can do the 3 steps to get a modal box warning.

Have a nice day, Okido

@rogerwang
Copy link
Member

There is no "Reload" to click here...

@qbroker
Copy link
Author

qbroker commented Jan 5, 2020

That is odd, I tried on 2 Linux machines before posting.
Anyway there is a more simple example, a modal alertbox shows the same behavior.
File is attached, remove the txt extension from the file.

Have a nice day, Okido
modalbox.html.txt

@rogerwang
Copy link
Member

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

@qbroker
Copy link
Author

qbroker commented Jan 5, 2020

Thanks.

@rogerwang
Copy link
Member

A nightly build for this issue is available at https://dl.nwjs.io/live-build/nw43/20200105-162000/69c924066. Please try it.

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

5 participants