From 39e67c56a425eeadeefc6d9179dbcfb8b0df70a0 Mon Sep 17 00:00:00 2001 From: Bernie <114138479+InforBG@users.noreply.github.com> Date: Tue, 24 Dec 2024 00:07:24 +0800 Subject: [PATCH] Fix Window.onClosing() not work in GWT 2.12 (#10074) When Window.onClosing(), if beforeCloseHandlersInitialized (not closeHandlersInitialized) is true, fire the ClosingEvent. Fixes #10072. --- user/src/com/google/gwt/user/client/Window.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/src/com/google/gwt/user/client/Window.java b/user/src/com/google/gwt/user/client/Window.java index 972f16d310..1ec68214da 100644 --- a/user/src/com/google/gwt/user/client/Window.java +++ b/user/src/com/google/gwt/user/client/Window.java @@ -853,7 +853,7 @@ static void onClosed() { } static String onClosing() { - if (closeHandlersInitialized) { + if (beforeCloseHandlersInitialized) { Window.ClosingEvent event = new Window.ClosingEvent(); fireEvent(event); return event.getMessage();