Skip to content

TextInput placeholder has jarring offset. #1530

@xStrom

Description

@xStrom

The placeholder text should be located at the same spot as the main text if they both have the same font size. This is true e.g. on the web.

However the Masonry widget currently has like a 1px offset pushing the placeholder text slightly away from the start.

One easy way to confirm this is with the xilem to_do_mvc example. Although you'll need to comment out the .text_size(16.) line to get equal font size. After that, try cut/pasting in the same text as the placeholder. You will see that the placeholder is slightly offset.

I'm not sure what causes this, because TextInput::layout calls ctx.place_child on both the main text and the placeholder with the same position. So the offset is introduced by something else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededmasonryIssues relating to the Masonry widget layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions