Skip to content

Bug: bad cursor position in text input #1030

Description

@dcz-self
  1. Set up a text field with a placeholder
  2. Set up on_enter which clears the text
  3. Run app
  4. Type some text
  5. Press enter

Expected: cursor is at the start

Actual: Cursor is in the middle of the placeholder.


I'd fix it myself but I'm tired right now. Filing so that it doesn't get forgotten.

This causes bad interactions wth set_surrounding_text btw, but at least nothing crashes, even when the cursor falls in the middle of a code point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions