Is your issue REALLY a bug?
Is there an existing issue for this?
Is this issue related to iced?
What happened?
text_input treats any cursor that's in-bounds of the widget but out-of-bounds of the actual text as being at the end of that text. This is incorrect for non-left-aligned text input. Try clicking within the text_input but left of the contained text:
fn main() -> iced::Result {
iced::run((), view)
}
fn view(_: &()) -> impl Into<iced::Element<'_, iced::Never>> {
iced::widget::text_input("placeholder", "value")
.width(100)
.align_x(iced::Center)
.on_input(|_| todo!())
}
What is the expected behavior?
Cursors that are in-bounds of the widget but left of the actual text should be treated as being at the beginning of that text.
Version
master
Operating System
Linux
Do you have any log output?
Is your issue REALLY a bug?
Is there an existing issue for this?
Is this issue related to iced?
What happened?
text_inputtreats any cursor that's in-bounds of the widget but out-of-bounds of the actual text as being at the end of that text. This is incorrect for non-left-aligned text input. Try clicking within thetext_inputbut left of the contained text:What is the expected behavior?
Cursors that are in-bounds of the widget but left of the actual text should be treated as being at the beginning of that text.
Version
master
Operating System
Linux
Do you have any log output?