this works for me onDeviceReady: function() { this.receivedEvent('deviceready'); document.addEventListener("backbutton", onBackKeyDown, false); } function onBackKeyDown() { if(document.querySelector('ons-modal').visible){ document.querySelector('ons-modal').hide(); e.preventDefault(); }}