-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Message field does not wrap #45
Comments
Was alt-enter handling the reason for switching from TextEditor to TextField? I think we should explore more options for TextEditor handling enter as a commit action and alt enter as an edit action. |
Yeah, among other issues that TextEditor brought, like a hardcoded background (someone figured how to override it with a transparent color), and no option for a placeholder hint. Also, there were other issues using it with a ScrollView. The other option is to use AppKit, which allows handling of the raw keydown events, but was very tough. |
I might use swiftui-introspect to access the low level NSTextView of the TextEditor to handle keyDown events 🤔 |
This appears to be fixed in macOS 13, irregardless of whether Xcode 13 or 14 is used to build Swiftcord. So, it appears to be some SwiftUI 'bug' (or maybe its a bug in macOS 13 that fixes this as a side effect?) that was fixed in macOS 13. Either ways, the 'fixed' behaviour in macOS 13 is not what I want (it scrolls horizontally when the field overflows instead of wrapping vertically), so I'll still have to figure out some other solution for this. |
Moved to #75 |
Describe the bug
When typing a long message into the message field, the text does not wrap once it hits the end of the field.
Although newlines work (opt + return), the text does not wrap anymore like it did before with
TextEditor
To Reproduce
Expected behavior
The text wraps to the next line
Screenshots
Note the cut-off 't' that appears after the cursor
Additional context
Text wrapping used to work while a
TextEditor
was used, but newlines didn't. Now, its the opposite xDThe text was updated successfully, but these errors were encountered: