I am using angular model service ($modal) display pop-up. I am facing a problem like when user click backspace on the model window, parent window gets navigating to previous page. How do i resolve this?
Asked
Active
Viewed 567 times
0
-
asking your users to stop pressing the backspace key? This is a navigation shortcut that exists on every browser if the focus is not in an input. – Deblaton Jean-Philippe Oct 29 '15 at 12:34
1 Answers
0
In your $modal.open() set the following:
backdrop: 'static'
keyboard: false

jbrown
- 3,025
- 1
- 15
- 22
-
Hi, This seems doesn't work., Because keyboard: false will disable browser close on ESC key event not works with backspace on model window – Velkumar Oct 30 '15 at 06:25
-
Yes, this also overrides the esc key behavior. You can give the user a button to cancel out of the modal in lieu of the esc key. I think that's a little cleaner anyhow. – jbrown Oct 30 '15 at 12:22