Skip to content

Commit

Permalink
Ignore disabled textfields
Browse files Browse the repository at this point in the history
  • Loading branch information
tareksabry1337 committed Aug 28, 2022
1 parent 3860dd1 commit 49df26c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/Focuser/TextFieldIntrospect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ public struct FocusModifier<Value: FocusStateCompliant & Hashable>: ViewModifier
}

if focusedField == equals {
tf.becomeFirstResponder()
if tf.isEnabled {
tf.becomeFirstResponder()
} else {
focusedField = focusedField?.next
}
}
}
.simultaneousGesture(TapGesture().onEnded {
Expand Down

0 comments on commit 49df26c

Please sign in to comment.