longzu / csexwb2

Automatically exported from code.google.com/p/csexwb2
0 stars 0 forks source link

javascript window.close() does not close window / tab #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. navigate to any page that uses window.close()
2. click on the link for window.close()

When a window.close() event is fired the window or tab should close.  This
is not the case with this control.

Working with version 1.0.5 of the control on windows xp pro.

The only way I can see solving this problem is to override the wndproc
event and close the window manually using code by intercepting the
WM_DESTROY message.

Original issue reported on code.google.com by srwri...@alcor.concordia.ca on 29 Aug 2007 at 1:43

GoogleCodeExporter commented 8 years ago
Are you using the DemoApp? If yes, then look at the cEXWB1_WindowClosing event 
of 
the frmMain, this is the event responsible for cancelling window.close calls by 
setting e.Cancel parameter to true. I did not add logic to remove the browser 
which 
can be done easily.

There is no need to use wndproc to find out if a winodw.close has been called. 
WindowClosing event should fire for the window.close call.

MH

Original comment by mehr...@gmail.com on 29 Aug 2007 at 2:09

GoogleCodeExporter commented 8 years ago
window.close() only works for pop-ups, not if you open the new window in a tab.

Original comment by srwri...@alcor.concordia.ca on 29 Aug 2007 at 2:25