Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry Completed Event Triggered Twice #27992

Open
SethupathyD opened this issue Feb 24, 2025 · 6 comments · May be fixed by #28018
Open

Entry Completed Event Triggered Twice #27992

SethupathyD opened this issue Feb 24, 2025 · 6 comments · May be fixed by #28018
Labels
area-keyboard Keyboard, soft keyboard platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@SethupathyD
Copy link

Description

When setting ReturnType="Search" in an Entry on Android, the return key type does not update properly. To work around this, I used EntryHandler.Mapper.AppendToMapping to ensure UpdateReturnType(view) is called when the view is attached to the window. However, this causes the Completed event to fire twice—once for the actual return key press and once due to the view being updated dynamically.

Image

Steps to Reproduce

Steps to reproduce

  1. Run the app on an Android device or emulator.
  2. Tap on the Entry, type something, and press the return key.

Expected Behavior
The return key should immediately display as "Search" when the ReturnType is set.
The Completed event should fire only once when the return key is pressed.

Actual Behavior
The return key does not initially show "Search" unless modified using EntryHandler.Mapper.
The Completed event fires twice when pressing the return key.

Link to public reproduction project repository

https://github.com/SethupathyD/EntryTypeIssue

Version with bug

8.0.83 SR8.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11

Did you find any workaround?

Used mapping as a work around but entry completed event gets trigerred twice.

Relevant log output

@SethupathyD SethupathyD added the t/bug Something isn't working label Feb 24, 2025
@bhavanesh2001
Copy link
Contributor

bhavanesh2001 commented Feb 24, 2025

@SethupathyD This was fixed with #26501 in 9.0.30

@Ying-6 Ying-6 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed platform/android 🤖 and removed t/bug Something isn't working s/triaged Issue has been reviewed labels Feb 24, 2025
@Ying-6
Copy link

Ying-6 commented Feb 24, 2025

This issue has been verified using Visual Studio 17.14 Preview 1(9.0.40 & 8.0.100 & 8.0.83 & 8.0.3). Can repro this issue on Android platform.
Image

@jfversluis jfversluis added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Feb 24, 2025
@jfversluis
Copy link
Member

Please try with the latest .NET 9 version, at the time of writing 9.0.40 and see how that changes the behavior and if that solves your problem. Thanks!

@jfversluis jfversluis added the area-keyboard Keyboard, soft keyboard label Feb 24, 2025
@Ying-6 Ying-6 added t/bug Something isn't working s/triaged Issue has been reviewed labels Feb 24, 2025
@SethupathyD
Copy link
Author

Hi @jfversluis ,

I have verified that with the latest version (9.0.40) on the Android platform. Setting ReturnType="Search" works without appendToMapping, but the issue still persists—the Completed event is triggered twice when performing a search on Android.

Regards,
Sethupathy D.

@dotnet-policy-service dotnet-policy-service bot removed the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Feb 24, 2025
@jfversluis jfversluis added this to the Backlog milestone Feb 24, 2025
@jfversluis jfversluis changed the title Entry ReturnType Does Not Work on Android and Triggers Completed Event Twice When Mapped Manually Entry Completed Event Triggered Twice Feb 24, 2025
@jfversluis
Copy link
Member

@Ying-6 @SethupathyD does this also happen on other platforms like Windows or iOS or only on Android?

@Ying-6
Copy link

Ying-6 commented Feb 25, 2025

@jfversluis This issue does not repro on iOS and Windows platforms on 9.0.40.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-keyboard Keyboard, soft keyboard platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants