Skip to content

Selection is rendered outside of TextInput #2198

@DaraJKong

Description

@DaraJKong

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

When selecting long text inside of a TextInput, the selection is displayed out of the bounds of the widget.
It happens when using Ctrl+A and also when clicking & dragging normally.

2024-01-12.00-05-59.mp4

The issue happens only in the master branch, the crates.io version is fine.

I don't think it's necessary, but I made a SSCCE: https://github.com/DaraJKong/iced/blob/fix/selection_outside_input/examples/buggy_text_selection/src/main.rs

What is the expected behavior?

The selection when highlighting long text should be clipped inside the TextInput widget, instead of appearing outside of it.

Version

master

Operating System

Linux

Do you have any log output?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions