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

FB14685760: LabeledContent breaks when placed inside a List, if it contains a TextField. #541

Closed
migueldeicaza opened this issue Aug 6, 2024 · 2 comments

Comments

@migueldeicaza
Copy link

migueldeicaza commented Aug 6, 2024

  • Date: 2024-08/06
  • Resolution: Open
  • Area: SwiftUI
  • OS: iOS 18 Seed 4
  • Type: Incorrect/Unexpected Behavior
  • Keywords: Regression

Description

The following example render a label and the textfield on iOS 17.5, but on iOS 18, the TextField takes over the entire line.

I have tried all the .listStyle options


import SwiftUI

struct ContentView: View {
    var body: some View {
        List {
            LabeledContent {
                TextField ("placeholder", text: .constant (""))
            } label: {
                Text ("Hello")
            }
        }
        .padding()
    }
}

#Preview {
    ContentView()
}

Included screenshots show that iOS 17.5 correctly displays the labels, while on iOS 18, only the textfield is rendered.

Files

iOS 17.5, works:
image

iOS 18.0, Beta 2 and Beta 4:
image

@migueldeicaza
Copy link
Author

I got an update, which I have not been able to confirm yet due to local setup issues, but I received a response:

Thank you for filing the feedback report. We have deployed the fix. Please verify this issue with iOS 18.1 Beta 5 and update your bug report with your results by logging into https://feedbackassistant.apple.com/ or by using the Feedback Assistant app.

@migueldeicaza
Copy link
Author

Confirmed that this has been fixed.

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

No branches or pull requests

1 participant