Skip to Content
0

How can I disable browser back and refresh button in sap ui5

Jan 12, 2017 at 05:59 AM

157

avatar image
Former Member

Hello,

I am developing an application for pharma industry where I have to handle all navigation from application itself.

But while clicking the browser back or refresh button navigation also happening, so wanted to check these two events.

Any help in this will be appreciated.

Thank you,

Kumar Gaurav

10 |10000 characters needed characters left characters exceeded
Former Member

Hi Gaurav,

Did you find any solution to this? I have a similar requirement like this.

Regards,

Ankur

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sharath M G Aug 10, 2017 at 03:35 PM
0
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sharath,

I have tried all the solution mentioned in the link. The only solution which worked partially is:

history.pushState(null,null, document.URL);
window.addEventListener('popstate',function(){
    history.pushState(null,null, document.URL);});
But it also restricts it for one click only, if you click again on Back button it will start behaving like old way. Can you explain in more detail if you have already tried this use case.
Best Regards,
Ankur
0

Never tried it myself.

0