I try to implement popup which will prevent user to leave page without saving.
That means I have to handle two cases: when user uses hardware back button and back button in toolbar.
I have MasterDetails page.
As Detail I push a Details1 page wrapped by NavigationPage.
From Details1 I pused Details2 page.
Here is where problem starts.
When I click hardware back button - called OnBackPressed on activity and I can successfully handle it.
But if I use Toolbar back button - method OnOptionsItemSelected not called at all.
It's strange for me because without MasterDetails page (just push Details2 from Details1) it works as expected:
OnOptionsItemSelected invoked and I can check if this was home button.
It reproduced even with latest forms.
Am I doing something wrong? Or this is bug at Xamarin.Forms?