Add Esc/Enter as a shortcut on modal screens
I've added Esc to Cancel, and Enter to Save both modal screens. This is a familiar key shortcut for those used to terminal solutions.
Hi @diegotolentino
That's a good idea, but before I could check the code itself, I tried the solution and I found a bug.
If you open a modal (like when you want to create a cronjob), use Enter to save (you will get an error saying you need to write an expression etc) and then you don't use Esc to cancel, but you use the cancel button, Cronboard crashes:
DuplicateIds: Tried to insert a widget with ID 'error', but a widget already exists with that ID (Label(id='error')); ensure all child widgets have a unique ID.
I think it is my fault. Or my implementation of the error label, which does not take in account your solution.
Do you want to take a look to it as well?
Thanks a lot!