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

Make the HideSoftInputOnTappedChangedManager class public #19905

Open
APopatanasov opened this issue Jan 15, 2024 · 1 comment
Open

Make the HideSoftInputOnTappedChangedManager class public #19905

APopatanasov opened this issue Jan 15, 2024 · 1 comment
Labels
area-keyboard Keyboard, soft keyboard partner Issue or Request from a partner team proposal/open

Comments

@APopatanasov
Copy link

APopatanasov commented Jan 15, 2024

Description

I have a native control exposed in MAUI via a handler. The native control is a composite one and contains a child of type UITextField in iOS and EditText in Android. I want to take advantage of the HideSoftInputOnTapped property of the ContentPage and hide the keyboard when the parent page is tapped.

As the HideSoftInputOnTappedChangedManager class is internal I cannot use it and call its UpdateFocusForView method for my custom control.

Also, the UpdateFocusForView method only takes the MAUI View as a parameter and the logic in the method heavily depends on the fact the the platform view inherits either from UITextField or EditText. For native controls that has a child of UITextField/EditText that method cannot be used.

Public API Changes

Mark the HideSoftInputOnTappedChangedManager as public and provide a method through which you can pass the native control that contains UITextField/EditText whose keyboard should be hidden.

Intended Use-Case

I want my controls to respect the HideSoftInputOnTapped property of the ContentPage and hide its keyboard like the Entry control.

@jsuarezruiz jsuarezruiz added the partner Issue or Request from a partner team label Jan 15, 2024
@APopatanasov
Copy link
Author

Partially addressed with #19626.

@PureWeen PureWeen added this to the .NET 9 Planning milestone Jan 16, 2024
@samhouts samhouts added legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-keyboard Keyboard, soft keyboard and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-keyboard Keyboard, soft keyboard partner Issue or Request from a partner team proposal/open
Projects
None yet
Development

No branches or pull requests

4 participants