To disable mobile device back button

0
I have added event listener for closing the popup in a page for the mobile device back button using javascript. But while clicking the device back button pop up is closed as well as page redirection also happens. How to disable page redirection?
asked
1 answers
0

Hi Karthiha,

Can provide more details about your problem?

- What event listener are you using? What does it do?
- What kind of redirection is happening? To what page (homepage, previous opened page, specific page) is it redirecting?

The more details you provide, the better we can help you answer it.

On a sidenote:
In Mendix, think of pages/forms as layers that are opened on top of each other, in a top to bottom sequence.
Closing a page using the Close Page action will close the current page and display the underlying page, if that wasn't closed yet.

For instance, 

Scenario 1, simple open and close page:

On the Homepage: I click the link to page A.
Open pages:
1. Page A
2. Homepage

I close page A by clicking the Close Page button.
Open pages:
1. Homepage (so this will be shown)
 

Scenario 2, open two pages without close page action:

On the Homepage: I click the link to page A.
Open pages:
1. Page A
2. Homepage

On page A: I click the link to page B.
Open pages:
1. Page B
2. Page A
3. Homepage

I close page B by clicking the Close Page button.
Open pages:
1. Page A (so this will be shown)
2. Homepage

 

Scenario 3, open two pages with close page action:

On the Homepage: I click the link to page A.
Open pages:
1. Page A
2. Homepage

On page A: I click the link to page B.
This is done by a microflow that has two actions: Close Page A, then Show Page B

Open pages:
1. Page B
2. Homepage

I close page B by clicking the Close Page button.
Open pages:
1. Homepage (so this will be shown)

 

I'm not entirely sure whether this relates to your problem, but it might help your problem analysis.

Also, I'm curious as to why you're using custom JavaScript and an event handler if there are out of the box mobile widgets to close a page.

Kind regards,
Jeffrey

answered