diff --git a/CHANGELOG.md b/CHANGELOG.md index c28272cbf..223e6390f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- The license activation sheet focuses the key field on open, the SQL review sheet closes with Escape even while the editor has focus, and the integration token sheet focuses its Done button. (#1490) - Copy with Headers now has a default keyboard shortcut (Cmd+Option+C), so it works and is discoverable from the keyboard instead of showing in the Edit menu with no key. (#1490) - VoiceOver now reads the column name and current value for each field editor in the cell inspector. (#1490) - VoiceOver announces the active tab title when you switch between window tabs. (#1490) diff --git a/TablePro/Views/Components/SQLReviewSheet.swift b/TablePro/Views/Components/SQLReviewSheet.swift index 62aaa2cc3..4e1bc09e0 100644 --- a/TablePro/Views/Components/SQLReviewSheet.swift +++ b/TablePro/Views/Components/SQLReviewSheet.swift @@ -55,6 +55,7 @@ struct SQLReviewSheet: View { } .frame(width: 560, height: 460) .background(Color(nsColor: .windowBackgroundColor)) + .onExitCommand { dismiss() } .task { await prepare() } } diff --git a/TablePro/Views/Settings/LicenseActivationSheet.swift b/TablePro/Views/Settings/LicenseActivationSheet.swift index 4cf7f5557..25be56923 100644 --- a/TablePro/Views/Settings/LicenseActivationSheet.swift +++ b/TablePro/Views/Settings/LicenseActivationSheet.swift @@ -13,6 +13,7 @@ struct LicenseActivationSheet: View { @State private var licenseKeyInput = "" @State private var isActivating = false @State private var errorMessage: String? + @FocusState private var keyFocused: Bool var body: some View { VStack(spacing: 0) { @@ -40,6 +41,7 @@ struct LicenseActivationSheet: View { .textFieldStyle(.roundedBorder) .disableAutocorrection(true) .multilineTextAlignment(.center) + .focused($keyFocused) .onSubmit { Task { await activate() } } if let errorMessage { @@ -79,6 +81,7 @@ struct LicenseActivationSheet: View { .padding(.bottom, 24) } .frame(width: 400) + .defaultFocus($keyFocused, true) } private func activate() async { diff --git a/TablePro/Views/Settings/Sections/MCPTokenRevealSheet.swift b/TablePro/Views/Settings/Sections/MCPTokenRevealSheet.swift index 3d640cfa0..430bd7501 100644 --- a/TablePro/Views/Settings/Sections/MCPTokenRevealSheet.swift +++ b/TablePro/Views/Settings/Sections/MCPTokenRevealSheet.swift @@ -11,6 +11,7 @@ struct MCPTokenRevealSheet: View { @State private var isTokenRevealed = false @State private var tokenCopied = false @State private var selectedClient: IntegrationClient = .claudeCode + @FocusState private var doneFocused: Bool var body: some View { VStack(spacing: 0) { @@ -29,10 +30,12 @@ struct MCPTokenRevealSheet: View { Spacer() Button(String(localized: "Done")) { dismiss() } .keyboardShortcut(.defaultAction) + .focused($doneFocused) } .padding() } .frame(minWidth: 540, minHeight: 520) + .defaultFocus($doneFocused, true) } private var warningBanner: some View {