IDEMPIERE-5520 Navigation between Tabs leave Detached DOM objects (Leak) (#1654)

- Fix change role session error with nginx proxy
- Minor refinement for change role UI
This commit is contained in:
hengsin 2023-01-27 17:48:42 +08:00 committed by GitHub
parent 4d9c77b2e5
commit 427427b7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -630,8 +630,9 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
//desktop cleanup
IDesktop appDesktop = getAppDeskop();
HttpSession session = httpRequest.getSession();
if (appDesktop != null)
appDesktop.logout(T -> {if (T) asyncChangeRole(httpRequest.getSession(), locale, properties);});
appDesktop.logout(T -> {if (T) asyncChangeRole(session, locale, properties);});
}
private void asyncChangeRole(HttpSession httpSession, Locale locale, Properties properties) {

View File

@ -823,6 +823,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
((Tab)tabs.get( i )).close();
}
AEnv.detachInputElement(layout);
layout.setVisible(false);
//schedule async logout
Executions.schedule(layout.getDesktop(), e -> asyncLogout(callback), new Event("onAsyncLogout"));
} else {