gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.25k stars 267 forks source link

Issue preventing default button activating (macOS) #144

Closed bartreardon closed 1 year ago

bartreardon commented 1 year ago

With MarkdownUI present on a form and a default button present, e.g.

        Button(action: {
           someAction() 
        }, label: {
            Text("Ok")
            }
        )
        .keyboardShortcut(.defaultAction)

When the form is displayed, the default button does not have focus of the .defaultAction key binding (i.e. the Enter key). Pressing the default action once does nothing. pressing it again activates the button.

It would pre preferred if the Markdown content did not steal the focus. This issue is not present on forms with no MarkdownUI view.

gonzalezreal commented 1 year ago

Hi @bartreardon,

Sorry for the late response. I just released MarkdownUI 2 and I believe this bug has been fixed:

https://github.com/gonzalezreal/swift-markdown-ui/releases/tag/2.0.0

Could you please check if you can still reproduce it with this version?

Thanks!

bartreardon commented 1 year ago

oh, some nice updates in v2.0, well done 🙂