Friday, September 14, 2018

addWindowClosingHandler only working in IE

GWT 2.8.2

In below code neither of the Window.alerts gets triggered in Chrome, FF and Edge.
This does not work neither while in SuperDevMode, or when fully compiled and deployed.

Only works in IE

The "go" alert is displayed by all browsers so I am sure the code was executed...

Any ideas anyone ?
Should I detect browser closing/tab closing/navigating to another URL in another way in these other browsers ?

I also tried using the deprecated Window.addWindowCloseListener. This actually does work in Edge (while the new handlers don't work in Edge). But not in Chrome and FF.

Window.addWindowClosingHandler(event ->

Window.addCloseHandler(new CloseHandler<Window>()
@Override public void onClose(CloseEvent<Window> event)


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment