I have an implementation of "RichFacesPleaseWaitBox" in my application, but has a problem.
When the user initiates any action, the status starts, displaying the modal "Waiting." When the action finishes execution, the status ends, hiding the modal "Waiting." Until here all right.
However, if the user starts the action, press the "ESC", the modal "Waiting" which had appeared, it disappears, allowing the user to click on the action again, making a new submit.
How can I block "ESC" to get workaround for this problem?
I Have tried that in my modalPanel, but not work.
<rich:hotKey id="hotKeyModalPanelSTATUS"
handler="alert('false');"
key="esc" />
If I got your point correct:
Import mousetrap.js file, follow the jquery documentation, and, finally do a code like this (on you modal shown event, of course):
You may also want to unbind the event in the hide event of the modal, so, you can do the following on the hide event:
Hope it helps.