Block HW back button

Block HW back button

BY 13 Sep 2013 Web Application Development

Hello everyone.

How can I block HW back button default behavour? For example, if I want to forbid user to go back until it save it’s work.

When I use:

document.addEventListener('tizenhwkey', function(e) {

// my code here

}

it exectute “my code” block and then moves to previous page. And I want to stay on current page.

 

Thanks in advance.

Written by