AlertifyJS
AlertifyJS copied to clipboard
Option to disable or unbind ESC and ENTER key on confirm dialog box
Hello,
I would like to know if there is a way to disable or unbind default ENTER and ESC key for validate and cancel "confirm dialog box" without the need to use create my own dialog box with the Dialog Factory?
If not, do you think it would be a good idea to implement an option to do it?
Thanks in advance for your answer and have a nice day.
Hello,
Is there a specific use case that triggered such need ?
Suppose you have a confirm dialog box with a choice like : Select between these options : Production (for the first button) Test (for the second one)
I think that ENTER or ESC key don't have sense in this case.
For a keyboard user, this makes perfect sense. To confirm with Enter
/Esc
wired, I would just press Enter
to confirm or Esc
to decline.
However, without them I have to tab to the Ok button then hit Enter
to confirm OR tab more to the Cancel button then hit Enter
to decline.
You are right if you think about a dialog box with 2 basics choices like Yes / NO or OK / Cancel. Enter
/ Esc
keys are logic key combination.
But when you have to select between Delete
/ Copy
or Move left
/ Move right
or anything that need a real decision that cannot be answered by a simple Yes / OK or No / Cancel I think it makes sense to force the user to select the right answer by selecting the correct button to avoid mistakes.
Now, has you told me in a previous post, this is not the basic philosophy of this component. But it could be a nice addition like for the examples I have mentioned just above.
Hi,
Is there any chance to have this behavior in AlertifyJS in a future release?
Component like SweetAlert2 do it but I really want to keep AlertifyJS because I use it from years and I simply love it.
Please, let me know if you think that it should be hard or not to add this feature.
Thanks and have a nice day.
Very need this feature