Skip to content

[Android & iOS]Make SearchHandler's Focus() and Unfocus() work #29278

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

bhavanesh2001
Copy link
Contributor

@bhavanesh2001 bhavanesh2001 commented May 1, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

iOS

Befor fix After fix
iOS_Before_fix.mov
iOS_After_fix.mov

Android

Before Fix After Fix
Android_Before_fix.mov
Android_after_fix.mov

Issues Fixed

Fixes #29277

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 1, 2025
@bhavanesh2001 bhavanesh2001 marked this pull request as ready for review May 1, 2025 10:23
@bhavanesh2001 bhavanesh2001 requested a review from a team as a code owner May 1, 2025 10:23
_editText.ClearFocus();
if (_editText.IsSoftInputShowing())
{
_editText.HideSoftInput();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should hide this by default

If users want the keyboard to hide they can use the keyboard API to do this.
If we leave this as a side effect then there's not really a way for users to opt out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm.. Does the same should apply to Foucs() as well ? Because I'm currently calling an extension method which forces the keyboard to show.

@bhavanesh2001 bhavanesh2001 requested a review from jsuarezruiz May 2, 2025 06:09
@karthikraja-arumugam
Copy link
Contributor

The same fix has already been included in PR - #28186

@bhavanesh2001
Copy link
Contributor Author

The same fix has already been included in PR - #28186

Sorry I missed that.
But I agree with @PureWeen #29278 (comment) on this.
We shouldn't be forcing keyboard behavior during Focus() and Unfocus(), which is what #28186 is doing.

@bhavanesh2001 bhavanesh2001 requested a review from PureWeen May 2, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shell SearchHandler.Unfocus() has no effect on iOS & Android
5 participants