nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Modal windows

Open dalerobbins opened this issue 11 years ago • 9 comments

@rogerwang would it be possible to have an option to specify a modal window when creating/opening another window in node-webkit? Example: Let's say I want to present an about window to the user for my node-webkit app which the user would have to close in order to continue back to the application. This would prevent the user from clicking back to the node-webkit app leaving the about window open in the background and would also prevent the user from instantiating another about window when it is already running.

This feature would give a node-webkit application a more native look and feel under certain circumstances.

dalerobbins avatar Dec 30 '14 20:12 dalerobbins

Why was this closed? It's a very important feature for native applications...

philgin avatar May 16 '15 11:05 philgin

Likely because it is possible with CSS and JavaScript. Make a div with fixed position and large z-index take up the whole screen. Make it dark or light background color with transparency to signify the window is disabled. When they click this element in the parent window have an onclick event blur() the parent give focus() to the child again. Remove this element only when you are ready to give the user access to the window.

Also possible with most UI libraries that have modal windows/dialogs.

baconbrad avatar May 16 '15 15:05 baconbrad

Please reopen this issue.

Using CSS we can only cover the browser window, not the builtin menu bar created with Menu (http://docs.nwjs.io/en/latest/References/Menu/) i.e. we can still click on the menus.

I don't think there is a workaround to this problem.

marckris avatar Mar 20 '17 14:03 marckris

let's keep it close and merge into #1409

rogerwang avatar Mar 21 '17 00:03 rogerwang

+1

ropbla9 avatar Jul 10 '17 04:07 ropbla9

+1

mohamedattache avatar Feb 09 '21 13:02 mohamedattache

+1 Yes, we need a REAL modal window, not those HTML-CSS popup inside the screen work around. Let's bring back those old modal popup window back in NWJS. Yes we all know a modal popup window can lead to multitude security issues in chromium as a web browsers. But we also know that doesn't apply at chromium as a desktop application, a modal popup window is A MUST HAVE feature in NWJS.

Quartzbell avatar Mar 01 '21 02:03 Quartzbell

Is there any update on this feature?

muhammad-bassiouni avatar Apr 27 '22 20:04 muhammad-bassiouni

+1

attachemd avatar Sep 18 '22 07:09 attachemd