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

text_area entry containing unpaired opening (, [, { does not respect flex, vstack, or hstack widths #4615

Open
ahgraber opened this issue Jan 10, 2025 · 1 comment

Comments

@ahgraber
Copy link

Describe the bug

I want to replicate the text editor, but I prefer to write in markdown / have the text persisted in State as markdown.
When using rx.text_area as a text entry field, if I type an opening (,[, or {, the text_area shrinks, which shifts everything in that flex, hstack, or vstack

To Reproduce

class State(rx.State):
    md: str = ""


def index() -> rx.Component:
    """Lay out main page."""
    return rx.flex(
            # editor edits text as HTML
            rx.text_area(
                set_contents=State.md,
                on_change=State.set_md,  
                width="50%",
            ),
            rx.box(
                rx.markdown(State.md),
                border="1px dashed #ccc",
                border_radius="4px",
                width="50%",
            ),

            direction="row",
            spacing="3",
        )

Expected behavior
text entered into the text_area should not alter how the page is rendered

Screenshots
image

Specifics (please complete the following information):

  • Python Version: 3.12
  • Reflex Version: 0.6.7
  • OS: macOS 15.2
  • Browser (Optional): Arc, Safari, Firefox

Additional context
Add any other context about the problem here.

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