Vaadin Charts Exporting question

When the Vaadin Charts Exporting is enabled, and a file is downloaded using the exporting menu, the system fires a window close (I think). I’m using the following function to handle the callback and gracefully close my system:

JavaScript.getCurrent().addFunction(“aboutToClose”, new JavaScriptFunction()
{
@Override
public void call(JSONArray arguments)
throws JSONException
{
System.out.println(“Got aboutToClose callback!!”);
cleanUp();
}
}

I suspect that the export download process calls removeWindow() which then invokes the close event. And, I want to trap and filter out these download calls since my clean up shuts me down. Does anyone have a suggestion on how I can trap this close call in order to filter the events?