Cannot input newlines into multi-line text fields #1224
-
Description When editing a multi-line textfield and pressing the return key or shift+return, I would expect a newline to be input. Instead focus is moved away from the input, Code example to reproduce the issue: import flet as ft
from flet_core import TextField
def main(page):
textfield = TextField(min_lines=2, max_lines=4)
page.add(
ft.Text("Multiline text input"),
textfield
)
ft.app(target=main) Describe the results you received: When editing a multi-line textfield and pressing the return key or shift+return, I would expect a newline to be input. Instead focus is moved away from the input, Describe the results you expected: Ability to enter newlines into multi-line textfields with return or shift-return. Additional information you deem important (e.g. issue happens only occasionally): Flet version (
Operating system: macOS monterey 12.6 21G115 Additional environment details: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Needs 'multiline=True'. Try this:
|
Beta Was this translation helpful? Give feedback.
-
Is this identical to #1106 ? |
Beta Was this translation helpful? Give feedback.
-
@gbrandt I believe |
Beta Was this translation helpful? Give feedback.
@gbrandt I believe
multiline=True
is the solution.