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
TextView not respecting the frame constraint #459
Comments
@hyouuu thanks for reporting + doing the work of exploring a potential fix! I believe that it's very possible to fix this without introducing a new Could you isolate and repro this in a sample project? It'd help me debug + fix this fast. |
Here you go - paste this into a new SwiftUI ContentView with SwiftUIX as a package and you can see the issue:
|
While making the demo, I found that the 3rd item has correct width when the text width is only slightly taking more than 1 line @vmanot |
Actually you don't need the
|
@hyouuu thanks! I'll aim to have this fixed within the next week along with a new release I'm planning to ship. |
@vmanot that'd be awesome!! |
@vmanot any updates on this yet? |
@hyouuu sorry got sidetracked with a ton of |
No worries at all and thank you for making this library! |
@vmanot just checking again as I’m getting closer to actually using this. Thanks! |
@hyouuu I'm still working on it. I have a fix locally but it's not performing as well as I'd want it to. If I can't improve over it I'm just going to release it under a user configurable unsafe flag. |
So when an empty textview is present, typing text that exceeds 1 line works properly (last row), but if I open a textview with text already, it overflows. Thoughts?
My code sample (I'm using my fork to get the height & selected range from https://github.com/hyouuu/SwiftUIX and can submit a PR if you like it)
I also tried setting
preferredMaximumLayoutWidth
but it still overflowsThe text was updated successfully, but these errors were encountered: