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

[iOS] Keyboard stays open when tapping outside of an entry #19375

Closed
AaronECS opened this issue Dec 12, 2023 · 3 comments
Closed

[iOS] Keyboard stays open when tapping outside of an entry #19375

AaronECS opened this issue Dec 12, 2023 · 3 comments
Labels
area-controls-entry Entry area-keyboard Keyboard, soft keyboard platform/iOS 🍎 t/bug Something isn't working

Comments

@AaronECS
Copy link

AaronECS commented Dec 12, 2023

Description

In previous versions of MAUI, tapping on an entry field and then tapping outside of that field would unfocus the entry and close the keyboard. This seems to have been changed with the latest update. Tapping outside of an entry doesn't close the keyboard or unfocus the entry anymore.

Steps to Reproduce

  1. Create a new .NET Maui 8 project
  2. Add an Entry in MainPage.xaml
  3. Run the app on iOS
  4. Select the Entry field
  5. Tapping on empty space outside of the entry field doesn't close the keyboard and doesn't unfocus the entry
  6. Tapping on the Click Me! button doesn't close the keyboard or unfocus the entry either

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.101

Affected platforms

iOS

Affected platform versions

iOS 17

Did you find any workaround?

No response

Relevant log output

No response

@AaronECS AaronECS added the t/bug Something isn't working label Dec 12, 2023
@PureWeen
Copy link
Member

https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.contentpage.hidesoftinputontapped?view=net-maui-8.0

@kaverk
Copy link

kaverk commented Jan 3, 2024

The HideSoftInputOnTapped property only applies to ContentPage types; what about reusable ContentView controls? This seems to be a breaking change between .NET 7 and .NET 8 that doesn't currently have a workaround. Entry/Editor controls don't fire the Unfocused event when you click outside them anymore, which means the keyboard stays open. Listening for clicks on all other 15 controls on my page to know when the user has clicked outside of the text box (in order to commit the text) is overly complicated.

@ghost
Copy link

ghost commented Jan 3, 2024

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

@samhouts samhouts added area-keyboard Keyboard, soft keyboard area-controls-entry Entry labels Jan 31, 2024
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jan 31, 2024
@samhouts samhouts added platform/iOS 🍎 and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Jan 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-entry Entry area-keyboard Keyboard, soft keyboard platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants