Question about Custom HTML Prompt and the Escape key

In the Custom HTML Prompt I’m working on, pressing the Escape closes the prompt, which is fine under normal circumstances.

However, when I have a “modal window” open (Bootstrap modal - it’s not a separate browser window), I don’t want the Escape key to close the entire dialog, only the modal.

Anyone got any ideas how to handle this? Thanks.

Maybe you can trap the escape key with JavaScript? Other than that I don’t know.

OK, thanks. Didn’t know if this was something you were specifically grabbing or not.