enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
985 stars 110 forks source link

Textfield selection properties not working #635

Closed DevFromDownUnder closed 1 month ago

DevFromDownUnder commented 1 month ago

Just testing selection properties of a textfield and they are not working, not sure about others.

Setting child properties does work.

Using TextField page of uranium app as a test

private void TestRoot_Clicked(object sender, EventArgs e)
{
    NameField.Focus();

    NameField.CursorPosition = 0;
    NameField.SelectionLength = NameField.Text?.Length ?? 0;
}

private void TestChild_Clicked(object sender, EventArgs e)
{
    NameField.Focus();

    NameField.EntryView.CursorPosition = 0;
    NameField.EntryView.SelectionLength = NameField.Text?.Length ?? 0;
}

TestRoot_Clicked

image

TestChild_Clicked

image

DevFromDownUnder commented 1 month ago

Thought the existing pull had already been accepted, accidentally added to it.

634 has the commits for this.

Do you want me to delete the PR and split into two new PRs?

DevFromDownUnder commented 1 month ago

Thought the existing pull had already been accepted, accidentally added to it.

634 has the commits for this.

Do you want me to delete the PR and split into two new PRs?

Reset and branched into a new PR.

I will review the unit tests before creating a new PR.

DevFromDownUnder commented 1 month ago

Have this ready to go, will wait for the other PR to be accepted to complete to avoid conflicts.