Skip to content

Keyboard reopens if there is a geometry reader #6

Open
@AramAramAram

Description

@AramAramAram

Hi, first thanks for package.

There is an issue if Textfield is within Geometry reader, last one keeps keyboard reopening because of view redrawn.

GeometryReader { metrics in
VStack{
TextField("Username", text: $username)
.padding(9)
.background(focusedField == .username ? Color.red : Color(.systemGray6))
.cornerRadius(8)
.focusedLegacy($focusedField, equals: .username)

        TextField("Password", text: $password)
            .padding(9)
            .background(focusedField == .password ? Color.red : Color(.systemGray6))
            .cornerRadius(8)
            .focusedLegacy($focusedField, equals: .password)
        
        TextField("Name", text: $name)
            .padding(9)
            .background(focusedField == .name ? Color.red : Color(.systemGray6))
            .cornerRadius(8)
            .focusedLegacy($focusedField, equals: .name)

}
}

Thanks,
Aram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions