Skip to content

Can't focus other elements with "tab" key when there is a recorder in the UI #208

Open
@kopyl

Description

@kopyl

Try this simple app:

import SwiftUI

struct ContentView: View {
    @State private var textInput = ""
    @State private var isToggleOn = false
    
    var body: some View {
        VStack {
            TextField("Enter text", text: $textInput)
            
            Toggle(isOn: $isToggleOn) {}
            .toggleStyle(.switch)
            
            Button("Button") {}
        }
    }
}

If you have keyboard navigation setting

Image
enabled, then you can easily navigate through elements by pressing "tab" key.

But if you add

KeyboardShortcuts.Recorder(for: .shortcut)

before

Button("Button") {}

then the Button won't be reachable by the tab key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions