Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prefers_default_focus and focus_scope modifiers #940

Merged
merged 4 commits into from
May 23, 2023

Conversation

carson-katri
Copy link
Contributor

Closes #571
Closes #572

I wasn't able to see any effect on macOS/watchOS, and I'm unsure what that effect would be. Most examples are for tvOS, which is not currently supported by LVN.

I also included support for the resetFocus action, which can be triggered for a given namespace with push_event:

def handle_event("reset_focus", %{ "namespace" => namespace }, socket) do
  {:noreply, push_event(socket, :reset_focus, %{ namespace: namespace })}
end

@carson-katri carson-katri requested a review from a team May 18, 2023 18:37
@carson-katri carson-katri merged commit d4fac65 into main May 23, 2023
2 checks passed
@carson-katri carson-katri deleted the prefers-default-focus-modifier branch May 23, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifier -> SwiftUI -> Focus: focusScope(_:) Modifier -> SwiftUI -> Focus: prefersDefaultFocus(_:in:)
2 participants