on 06-13-2016 8:46 AM
Hi All.,
I want to control Backspace/Browser Back Button functionality in My custom Fiori app.
The issue is., If I Clicked outside Input control and I pressed Backspace, by default it is taking browser back button functionality.
Because of this, user is getting navigated from the current page to last visited page and user losing all other data which entered in rest of the fields.
Is there any possibilities of avoid this issue?
-Mahendran
Found the solution for controlling Backspace key issue. Here is the code for same.
window.addEventListener("keydown", function(e){
if(e.keyCode == 8 && document.activeElement.value == undefined)
{
e.preventDefault();
}
});
Note: Add it inside init()
Regards,
Mahendran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.