I need to fire up a popup on window's close button click if certain condition is not met. So effectively, I want to stop the window from closing. Apart from hiding the close button I have no other ideas.
Any suggestions?
You'd have to add a click handler, find out if the click is on the close button and cancel the event. The close event handler can intercept the event and do whatever, but not cancel the event.
Thanks for the effort to help. I'm afraid I don't have access to Window's close button. All I can do with it is show or hide it. I can't get a reference to it. There is no such method.
Update :
I managed to stop it from closing but things are really strange.
If I don't add onCloseClick handler, Window will close on Close button click. If I do add the handler (empty or not) Window will not close on button click. I'm pretty sure things shouldn't work this way.
I'm using GWT 2.0.2, SmartGWT 2.1 and Chrome 4.1.
Any thoughts on this?
Comment