From 62db361b137cd3fcee76c66a293ca21db9ab9904 Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Sun, 18 Aug 2024 23:26:43 +0200 Subject: [PATCH] Remove Subject and Description text focus when tapping elsewhere on the screen in meeting creation / edition --- .../Main/Meetings/Fragments/ScheduleMeetingFragment.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift b/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift index eab916422..0f198a9dc 100644 --- a/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift +++ b/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift @@ -45,6 +45,7 @@ struct ScheduleMeetingFragment: View { @State var addParticipantsViewModel = AddParticipantsViewModel() @FocusState var isDescriptionTextFocused: Bool + @FocusState var isSubjectTextFocused: Bool var body: some View { NavigationView { @@ -103,6 +104,7 @@ struct ScheduleMeetingFragment: View { .frame(width: 24, height: 24) .padding(.leading, 15) TextField("Subject", text: $meetingViewModel.subject) + .focused($isSubjectTextFocused) .default_text_style_700(styleSize: 20) .frame(height: 29, alignment: .leading) Spacer() @@ -332,6 +334,9 @@ struct ScheduleMeetingFragment: View { Spacer() } .background(.white) + }.onTapGesture { + isDescriptionTextFocused = false + isSubjectTextFocused = false } Button { @@ -349,6 +354,8 @@ struct ScheduleMeetingFragment: View { } .padding() + + if meetingViewModel.operationInProgress { HStack { Spacer()