-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Numeric Keyboard NEEDS to have a close keypad or DONE button on it like the Return on the full keyboard. Android has it, iOS does not. #19550
Comments
I have a similar issue. I use this code (as an extension if View) to hide the keyboard from a tap gesture recogniser on various content views (e.g. this.HideKeyboardAsync()) `
` |
Adding to this issue. My users are finding it very hard to work with numeric entries while it's just fine on Android. Granted, I think the blame lies on Apple, but if there's anything MAUI can do to improve the situation, that would be wonderful. |
I have the same issue - when I have numeric keyboard open on iOS I can't close it by tapping on the screen. |
@eqmarcin you can enable tap-to-dismiss by adding |
Can also pretty easily be added through the handler: public static void ManageDoneButton( IEntryHandler handler, bool show )
{
if ( show )
{
var toolbar = new UIToolbar( new RectangleF( 0.0f, 0.0f, 50.0f, 44.0f ) );
var doneButton = new UIBarButtonItem( UIBarButtonSystemItem.Done, delegate
{
handler.PlatformView.ResignFirstResponder();
var baseEntry = handler.VirtualView.GetType();
( ( IEntryController ) handler.VirtualView ).SendCompleted();
} );
toolbar.Items = new UIBarButtonItem[]
{
new UIBarButtonItem (UIBarButtonSystemItem.FlexibleSpace),
doneButton
};
handler.PlatformView.InputAccessoryView = toolbar;
}
else
{
handler.PlatformView.InputAccessoryView = null;
}
} |
@BioTurboNick @bradencohen thank you for your replies. Both options will work for me. |
this setting does not work on all circumstances, it seems. I have it on two locations, only works in one of them. |
I'm having the same issue with numeric keyboard on iOS, it's impossible to close by tapping. Please fix this soon. |
Until this is solved, you can use the following workaround:
i.e. for iOS only, swap out the numeric keyboard for the default keyboard. The default keyboard can be dismissed by using the enter/return button. Another workaround is to swap out |
This is also a problem for our app. It is a bad design on Apple's part, with no way to dismiss the keyboard. |
Please fix this! |
I used this in my app as a workaround, but Xamarin has the 'Done' button and MAUI does not. Please add this. |
A possible fix here: #24645 |
Description
When you specify Keyboard="Numeric", then numeric keyboard that comes up does not have a button to complete in iOS
In Android it does.
Also, when you have a full keyboard there is a 'keyboard' button in the lower right that will hide the keyboard. There NEEDS to be the same button in the numeric keyboard.
I am using:
HideSoftInputOnTapped
="True"` in ContentPageThat works for a lot of scenarios but I'm using Telerik controls and the RadComboBox and hide by clicking outside of the keyboard and controls doesn't work for it. There are situations where you just need a button to click.
The CommunityToolkit.Maui has KeyboardExtensions.HideKeyboardAsync() but the FATAL FLAW with that is that you have to specify the control. Sometimes the keyboard is displayed when it shouldn't be and I just want to issue a Keyboard.HideKeyboard() or something like that preemptively when I enter a page. Some pages the keyboard comes up where there aren't any controls that take input. I have NO way to close without a generic just hide the keyboard command.
I find it hard to believe there is no API to just hide the keyboard. Does it really have to be tied to an ITextInput control??
Please let me know if there is such an API and if there is not then it is needed badly!!
I have lost several days to this problem.
You just need to add a close keyboard button on the numeric keypad. If it is a full keyboard then no problem because you just hit return.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
NO
Relevant log output
No response
The text was updated successfully, but these errors were encountered: