Skip to content

[Android] Fix for Entry SelectionLength #24064

Merged
PureWeen merged 14 commits into
dotnet:mainfrom
NirmalKumarYuvaraj:fix-18443
Aug 23, 2024
Merged

[Android] Fix for Entry SelectionLength #24064
PureWeen merged 14 commits into
dotnet:mainfrom
NirmalKumarYuvaraj:fix-18443

Conversation

@NirmalKumarYuvaraj

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Aug 7, 2024

Copy link
Copy Markdown
Contributor

Root Cause

The entry control does not automatically receive focus when the view is attached to the window. It can only be focused when the user taps on it or sets the focus manually, such as by using the Tab key. As a result, the entry does not initially have focus.

Description of Change

Verified the behavior of the Editor control, which is similar to the Entry control. The Editor is functioning as expected, so the code changes were implemented in the Entry control as well.

Reference

Referred code changes from EditorHandler.Android.cs file -

void OnPlatformViewAttachedToWindow(object? sender, ViewAttachedToWindowEventArgs e)
.

Issues Fixed

Fixes #18443

Output

Before

Before.mp4

After

After.mp4

@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner August 7, 2024 10:45
@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Aug 7, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@rmarinho

rmarinho commented Aug 7, 2024

Copy link
Copy Markdown
Member

Can we add a test?


void OnPlatformViewAttachedToWindow(object? sender, ViewAttachedToWindowEventArgs e)
{
if (PlatformView.IsAlive() && PlatformView.Enabled)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I'm thinking you'll be able to add visual tests for this one. If you can't get an automated test for this PR just let us know and we can add a manual one internally.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added visual test for this. Please verify

@rmarinho

rmarinho commented Aug 8, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

These code changes will ensure that SelectionLength is correctly applied both during initial loading and at runtime.

@PureWeen

PureWeen commented Aug 8, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

This comment was marked as outdated.

Comment thread src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18443.cs Outdated
@PureWeen PureWeen assigned samhouts and PureWeen and unassigned PureWeen Aug 8, 2024
@azure-pipelines

This comment was marked as outdated.

Comment thread src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18443.cs Outdated
@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

The issue occurs only on the Android platform, so the test case is added only for Android.

@azure-pipelines

This comment was marked as outdated.

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@jfversluis , Could you please review the recent changes and trigger the pipeline.

@azure-pipelines

This comment was marked as outdated.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho

rmarinho commented Aug 22, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen enabled auto-merge (squash) August 22, 2024 18:14
@PureWeen PureWeen disabled auto-merge August 22, 2024 19:12
@PureWeen PureWeen enabled auto-merge (squash) August 22, 2024 19:12
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen

Copy link
Copy Markdown
Member

Failing test is unrelated

@PureWeen PureWeen disabled auto-merge August 23, 2024 15:34
@PureWeen PureWeen merged commit ebf7604 into dotnet:main Aug 23, 2024
@samhouts samhouts added the fixed-in-net8.0-nightly This may be available in a nightly release! label Aug 27, 2024
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Sep 5, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.2.24503.2 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Oct 14, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj deleted the fix-18443 branch October 18, 2024 05:57
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution fixed-in-9.0.0-rc.2.24503.2 partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

SelectionLength Property Not Applied to Entry at Runtime

5 participants