From 6ca3c06046e7050eb478e0a972b6df84e4e898f6 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Thu, 6 Aug 2026 00:14:37 +0300 Subject: [PATCH] Open keyboard for New Note shortcut on iOS Focus the input field and open the keyboard when the New Note view is opened via iOS shortcut. Closes #44 --- Zettel/NewNoteView.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Zettel/NewNoteView.swift diff --git a/Zettel/NewNoteView.swift b/Zettel/NewNoteView.swift new file mode 100644 index 0000000..2dc2b2e --- /dev/null +++ b/Zettel/NewNoteView.swift @@ -0,0 +1,14 @@ +import SwiftUI + +struct NewNoteView: View { + @State private var content: String = "" + @FocusState private var isFocused: Bool + + var body: some View { + TextEditor(text: $content) + .focused($isFocused) + .padding() + .navigationTitle("New Note") + .onAppear { isFocused = true } + } +}