cancel
Showing results for 
Search instead for 
Did you mean: 

Change standard behavior Home button

Former Member
0 Kudos

Hi,

How can I change the standard behavior of the Home button, in the upper left corner?

I want to add some logic that prevents going to the home screen (launch pad) if there are unsaved changes.

I worked out this solution:


$( "#homeBtn" ).click(function( event ) {

if (window.UNSAVEDCHANGES){

       event.preventDefault();

}else{

     return true;

}

});

but... as you can tell, this is not a very clean solution.

So I was wondering if SAP provides a solution to do this...

Kind regards,

Robbe Wuyts

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Robbe,

I have not tried it. But how about handling in router change event? I think upon clicking Home, route changes to "#'.

Other thought is about view's onExit method. But not sure if exit can be aborted there say by returning 'false'.