Skip to content

event-editor: Focus "Done" button for read-only events (fix the Escape keyboard shortcut)

Since !421 (merged), we focus the summary entry when opening the dialog.
However, this accidentally prevents the Escape keyboard shortcut from working when opening a read-only event after having opened a writable event.

This commit here sets focus onto the "Done" button when showing a read-only event, as it's the only widget that can be activated/clicked in this situation. It makes the "Escape", "Spacebar" and "Enter" keyboard shortcuts work, which makes a lot of sense in this situation.

This MR is a complement/sequel to !419. It could be merged independently of it if needed, but would make more semantic/chronological sense after 419. If merging it after 419, it will simply need to be rebased and deconflicted due to the very close proximity of lines changed.

Fixes issue #1180 (closed)

Merge request reports