dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.14k stars 1.74k forks source link

When in the Shell, HideSoftInputOnTapped does not work at Navigation.PushAsync(animated: false) in TapGestureRecognizer #23206

Open cotrasys opened 4 months ago

cotrasys commented 4 months ago

Description

HideSoftInputOnTapped does not work at Navigation.PushAsync(animated: false) in TapGestureRecognizer. The Button control's PushAsync worked correctly.

Xamarin.forms has no options about "HideSoftInputOnTapped", but there was no problem.

https://github.com/dotnet/maui/assets/160806273/90441d89-752d-43bc-8848-2d9b523c65c9

Steps to Reproduce

  1. Load the repository and run the app.
  2. Tap the "Go to SecondPage" button.
  3. Focusing to Entry control, tap "Go to ThirdPage" button. The soft keyboard will be disappeared.
  4. Back to SecondPage. focusing to Entry control once again, tap "Go to ThirdPage by Border". The soft keyboard will be still there.

Link to public reproduction project repository

https://github.com/cotrasys/HideSoftInputIssue.git

Version with bug

8.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

github-actions[bot] commented 4 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

ninachen03 commented 4 months ago

I can repro this issue on the latest 17.11.0 Preview 2.1 (8.0.60 & 8.0.40 & 8.0.70-ci.net8.24321.1)

cotrasys commented 4 months ago

I noticed that the atached repository was private. I changed to public now. Sorry for the convinience.

Also, I added Xamarin.Forms repository. This works fine. (Using Frame instead of Border) https://github.com/cotrasys/HideSoftInputXamarin

https://github.com/dotnet/maui/assets/160806273/f3d9985b-1661-4dbf-b1a2-d9bb3ff8aeaf