Closed gene-pavlovsky closed 7 years ago
Seems like for some reason I deleted AcceptButton = closeButton
and CancelButton = closeButton
.
It might be related to other key handling stuff, but I doubt that. I'll check again.
I realised that I removed CancelButton
feature, which allows ESC to close the dialog, on purpose.
I've improved the dialog so that when no changes are made, the file isn't re-written. And also that closing the dialog with the X button doesn't save the changes either. Thus I thought it makes more sense to only allow Enter to close the dialog as "Accept".
But as the button label changes between "Cancel" to "Save" according to the state, it would be better to maybe allow ESC to always cancel, and Enter to only save when available. But that's kind of really unnecessary complexity (although just one keydown handler) so I've just added ESC to close feature anyway.
So, closed with 5c6215d9222268a503e588bc008cd3b00ec2cbe4
Most dialogs can be closed by Esc, but shortcuts dialog is not. It's inconvenient to use mouse to close it.