0

Any way to control the closing of the browser?

asked 2020-05-14 14:53:35 +0800

softteam gravatar image softteam
120 8

I would like to be able to programmatically control when a user closes a browser window in order to be able to unlock records. Do you know any way to carry it out?

delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2020-07-22 10:42:34 +0800

hawk gravatar image hawk
2740 1 5
http://hawkphoenix.blogsp... ZK Team

There is a known issue: ZK-4204 future chrome feature currently preventing "rmDesktop" (causing non cleaned up desktops)

If you use Chrome >= 73, ZK (<=8.6.1) can't remove Desktop as expected, so does DesktopCleanup listener can't work correctly.

It's fixed in 8.6.2, please upgrade ZK.

link publish delete flag offensive edit

Comments

Thank you very much!!! I have done tests with projects in the version that you indicate and it works correctly. Regards.

softteam ( 2020-07-23 18:47:00 +0800 )edit
0

answered 2020-05-14 18:00:58 +0800

LuigiFabbri gravatar image LuigiFabbri
46 5

updated 2020-05-15 11:39:18 +0800

hawk gravatar image hawk
2740 1 5
http://hawkphoenix.blogsp... ZK Team

Hi

you can do this

component.getDesktop().addListener(new DesktopCleanup() {            
    @Override
    public void cleanup(Desktop desktop) throws Exception {
    }
});

where component is your Component, for example, it can be a Window.

link publish delete flag offensive edit

Comments

0

answered 2020-07-15 17:40:43 +0800

softteam gravatar image softteam
120 8

I have DesktopCleanup implemented but when I close the window or the tab it doesn't go through the cleanup method. I have also tried using the listener and it does not work either.

image description

image description

image description

link publish delete flag offensive edit
0

answered 2020-07-15 20:49:34 +0800

LuigiFabbri gravatar image LuigiFabbri
46 5

updated 2020-07-15 20:50:11 +0800

hi you have to do this:

window.addEventListener("onClose", new EventListener<event>() { public void onEvent(Event event){

   });
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2020-05-14 14:53:35 +0800

Seen: 27 times

Last updated: Jul 22 '20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More