gui.Window.open() loses opener

10 views
Skip to first unread message

Rémi Destigny

unread,
Apr 11, 2014, 10:32:30 AM4/11/14
to node-...@googlegroups.com
Hi,

I'm currently building an app with node-webkit and experiencing some trouble with opening new window. 

Basically what happens in my app is : 

1 Open splash.html ( a splash screen )
  1-1 Open the main application ( main.html) with gui.Window.open() but hide it 
  1-2 On 'loaded' event, close first window ( splash.html ) and show main.html

2 In the app i can compose an email which creates a new window ( composer.html )
  2-1 User click the compose button -> open the composer with gui.Window.open()
  
3 The compose window rely on the main window for it's logic, the main window is accessed with window.opener

This works really fine using a regular browser, but when I bundle it inside node-webkit, window.opener is mostly undefined. I say mostly because sometimes ( ~10% ) the opener is set in the compose window. 
I tried to figure out what was wrong but googling on this subject didn't really helped me. 

The things I tried : 

setting the window opener to the current window after opening it => Fail
going down to the first opened window ( the one defined in the package.json ) to call the open() => Fail

If anyone has any hints on how to solve this, it would be greatly appreciated. I'll be happy to give more details if required. 


Cheers

Rémi


Reply all
Reply to author
Forward
0 new messages