mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Change timing to close command bar
This commit is contained in:
parent
fe5ac92995
commit
f841cf8705
@ -8,6 +8,7 @@ Change Log
|
||||
### Fixes
|
||||
|
||||
- [beta] Fix an issue that disabled menu items were listed as the quick action candidates.
|
||||
- [beta] Fix an issue that some actions were not performed properly by the Quick Action.
|
||||
|
||||
|
||||
|
||||
|
@ -149,10 +149,13 @@ struct CommandBarView: View {
|
||||
/// Perform the selected command and close the view.
|
||||
private func perform() {
|
||||
|
||||
// first close the command bar and then take the action
|
||||
// so that the action is delivered to the correct (first) responder.
|
||||
self.parent?.close()
|
||||
|
||||
if let command = self.candidates.first(where: { $0.id == self.selection })?.command {
|
||||
command.perform()
|
||||
}
|
||||
self.parent?.close()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user