Event when leaving the page

Hi,

I would like to detect the closing of the page, I don't know how to intercept this action?

I use the "onBeforeUnload" event, but it only works when we refresh the page

Thanks for your help.

  1. what browser is this?
  2. is there some interaction with the browser first?

See also:

Thanks,

I use Chrome from a pc or a Android tablet, I have the same behavior with Edge.

Ok, I will have to add JavaScript code directly?

Form.OnBeforeUnload is triggered by the JavaScript onbeforeunload event. So, if OnBeforeUnload is not triggered, I expect JavaScript onbeforeunload not to be triggered. So, it must be found out why. Is there prior interaction with your page?

Sorry I don't undersatand "Is there prior interaction with your page?" Indeed users interact on the page before leaving the tab or explorer. They identify themselves, consult or modify data on this same page.

If the user interacted and you do not get this event, then something else must be wrong. Did you first test this separately in a simple new app and compared with your current app?

Sorry for the late response !

No I didn't, I'm going to create a new blank project and do some tests.

I keep you informed,

Thanks for your help