-
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
Maui BlazorWebView input covered by Keyboard #14197
Comments
For now I am doing this, I find that iOS and Android both react the same way, where they resize the Content Page to the remainder of the screen, if this is sufficient for your issue you can do the below. iOS does this by default and Android by default seems to do nothing or maybe does the pan option (which doesn't work if the item is at the bottom of the scroll view.
This means that it'll trigger a full resize on the view since the container is changing in size, this can sometimes be ok, but we would prefer to be able to choose the Pan equivalent (which doesn't seem to work in android for Maui.NET Blazor web views.) and have the same equivalent in iOS so the view doesn't change and just gets translated. |
To give a better reason as to why the translation version would be beneficial. If you have a 100% height layout instead of a scrollable layout, this could break the web layout that was fine prior to the keyboard being visible. |
Can confirm your workaround works. Is this a planned fix as a default behavior in .NET 8? |
The provided fix doesn't provide a solution for my project (.NET 7, Android, MAUI BLAZOR project) |
This is a massive issue, the virtual keyboard wipes out half of the UI with no way for the user to access it. |
I am using a method ( .NET 7 )
Please note:Compared to the initial answer, I have made some modifications. Mainly to solve problems that may occur in small window mode and full screen mode |
I can confirm @Yu-Core's solution does the job. I would still like to see this as default MAUI behaviour though. |
Thank you @Yu-Core your soultion working well :) |
@PureWeen @tj-devel709 any thoughts on this one after having done some of the keyboard work recently? |
Use @Yu-Core code, it's perfect. I used the code and it's working properly with the
Android app.
|
hopefully this will be shipper in .NET 8 |
Hi @radderz. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Works Great! but IsImmersiveMode method fails. |
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! |
Description
When you have an input near the bottom of your page, on click of an input, the soft keyboard will cover the input.
There is no simple way to deal with this in MAUI with Blazor. Ideally it would either pan the whole view up or add a translation of the view based on the size of the soft keyboard and scroll to the input. Adding margin on the Blazor view could work but then the height of the view would be affected causing full browser redrawing of the page which wouldn't be ideal.
The issue lies in that the website itself is scrollable, and can have elements at the bottom of the page, but the keyboard is just overlapping the bottom section of the screen and the bottom of the web view is covered.
Steps to Reproduce
Link to public reproduction project repository
Don't have one
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
iOS 14+, Android 24+
Did you find any workaround?
#14197 (comment)
Not yet, I am going to try to translate the webview by the size of the keyboard to see if that works well, but this may not be perfect either (This would be similar to the Android specific PAN feature). But to do this it needs to be easy to access when the keyboard is visible or not.
The Android specific PAN feature also doesn't work, I am guessing this is due to the input not being a native component.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: