0

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?

Velkumar
  • 446
  • 1
  • 8
  • 20

1 Answers1

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