Once you have overridden the back button using the listener, it doesn't perform the native functionalities. You have to implement the exit behaviour as well.
In your overriding method, use the following
document.addEventListener('backbutton', function(){
if(menu is visible) {
//Hide the menu
//This is also working fine
return false;
}
else //nothing is visible, exit the app
{
navigator.app.exitApp();
}
});
Hope that helps.