-
-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onCancel not being called for modals #5203
Comments
Hi elios.I think it's not a bug,because the doc say that Maybe these help? |
Hi @NE-SmallTown, It is not browser behaviour, I checked the underline source code but I couldn't figure out because the library uses rc-dialog underneath, but the rc-dialog does calls onCancel when pressing ESC, I read "cancel button and x button" too, I just think they missed that case. |
We need to trigger Could you try to PR to fix this? @elios264 @NE-SmallTown |
@elios264 Sorry for that I don't check rc-dialog src code,it does handle the "ESC" key.
It does is a bug like @benjycui says,when you press "ESC" key,the execute order is:
So,the final handle function is |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Environment(required)
What did you do? Please provide steps to re-produce your problem.
What do you expected?
a console log when pressing ESC key
What happens?
The modal closes but the log is not printed
Re-producible online demo
http://codepen.io/elios264/pen/RpoVeE
The text was updated successfully, but these errors were encountered: