-
Notifications
You must be signed in to change notification settings - Fork 481
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
Cordova Status Bar Plugin (with StatusBar.overlaysWebView(true)
) hides the input when the keyboard appears
#110
Comments
What platform? |
It's on android 7.1.1 |
Ahem, I see big screenshots - but not really what is going on and what is wrong. Could you resize and annotate maybe? |
*cordova |
And without the statusbar plugin, you get the same result as in the browser? I think it would be important to have a super simple project that replicated the problem here. Meaning: |
Yeah without the status bar plugin, I get the same result as the browser :) I'll do what you've asked soon and post a link here! |
Best minimize the HTML as well so it is really just the needed elements then please. |
Sorry For the late action. Here's a simple project demonstrating the issue |
Please create a repository on Github and upload the code there. That can be checked out and tested directly on the command line. THanks. |
Ok, have it running (had to delete
Everything as expected? |
Yeah other than that everything as expected! 👍 |
Yeah that's expected because I've enabled screen overlay ;) |
Ok, this got me thinking: Is it really the presence of the plugin causing the behavior or is it actually the usage of some specific functionality? I changed the code in
Now I have a red statusbar, and the input field is still visible above the keyboard. Conclusion: The presence of the plugin is not the problem, the usage of specific features of it might cause this. My guess would have been |
Since, I've used StatusBar.overlaysWebView(true); , The Statusbar just overlays on top of the page. The page has a blank top to blend with the status bar :) |
Sorry, I don't understand. Did you move the app top bar down a bit so it looks normal? |
yeah exactly! |
StatusBar.overlaysWebView(true)
) hides the input when the keyboard appears
Ok, so using |
Yeah!! in iOS, it shrinks a little but still the input is not visible! |
Oh, someone/I will have to look into iOS later as well then. |
Here is what I have gathered... When the statusbar is in overlay mode, this sets the view to be in fullscreen. This is required for a transparent status bar. However, when the view is in fullscreen mode, then the view cannot resize. It will remain full screen even if the keyboard is shown. This results the keyboard overlapping the view. I've tried some hackish workarounds, but none of them really work or produced undesirable side effects. By default, the android app is configured with SOFT_INPUT_ADJUST_RESIZE, which says the view should resize when the keyboard is shown. From the android docs...
For the record, I tried using SOFT_INPUT_ADJUST_PAN, but neither options appears to work with full screen. |
Statusbar overlay view resize with keyboard added StatusBarViewHelper in plugin.xml
Ok I think I have a working solution for android. I don't have a mac or an iOS device, so I can't be of any help there. I'm not an official contributor, and reading the instructions I need to sign an Apache ICLA? But I don't see how I can obtain and sign one. But I'll be more than happy to work with the cordova team with this to get a PR in. In the meantime, you can try using my fork Tested on an Android 8 device. |
Heyy @breautek Happy New Year!! :) Thank you so much for taking your time to fix it! :D It works near to perfect now in Android! Still there are problems in iOS |
@tharunkumar0 I've checked with my colleague and we could not reproduce the issue on iOS 11 & 12 devices running the cordova ios platform 4.5.5. Someone else on https://issues.apache.org/jira/browse/CB-13300 also claimed that they tested iOS on cordova platform 4.5.5 and could not reproduce the issue. So it might be possible that there is something else unrelated going on there for you on iOS. |
Hi there, I encountered the same issue developing my app. Reading all about this issue I was trying to download the fix to update the plugin, but I can't because the link in this comment is redirecting me to the home page of the repository. |
The PR hasn't been merged in yet. But you can install and use my fork instead of the official cordova version in meantime using the command line in my earlier post.
You can also watch #128 which is the PR for this issue, so you know when you can switch back to the official version. |
Got it! Thank you so much! |
With status bar an in-app browser plugin, the following change in config.xml resolved the issue for me
|
This
Thanks, the problem stills on new version of this official plugin and ionic 5, can someone merge the solution? @breautek can apply your changes to last stable version? |
I'm not sure if my PR will ever be merged tbh, testing against newer webviews (chrome 74+) the webview semes to update when the keyboard is shown now, something that didnt' happen in the past. This means that content is no longer hidden by the keyboard. Not sure exactly when this change happened, but if the chrome webview is doing this automatically, then it renders my PR redundant (because that's what my PR did...) Additionally the next major of |
Hi @breautek, On my current project with: -cordova-android 8.1.1 When I click into a input the keyboard overlaps it. Then, If I restart the app with StatusBar.overlaysWebView(false) this does not happen. With your fork of the repo this problem not happen. What would be happening? |
Ahh.. I think I forgot about the overlay mode and was probably operating with the solid status bar... I'll try to retest tonight and see if I can get my PR moving again. |
@breautek Just wanna say thank you! Your fork works perfectly. Tested on iPhone X iOS 13 and Samsung S10+ Android 10. It'd be so good if the PR is in after this long wait. |
Just simply move everything you need to |
Yes it works with this fork!
cordova plugin add
https://github.com/breautek/cordova-plugin-statusbar.git#issue-110-statusbar-overlay-keyboard-resize
Remove your existing plugin and add this!
…On Mon, 3 Dec 2018, 8:53 pm ParulShukla90, ***@***.***> wrote:
+1
@tharunkumar0 <https://github.com/tharunkumar0> were you able to solve
it? I am facing the same issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#110 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ArbXBkUR4MwHc_oodyMFR2J73zV250t4ks5u1UH3gaJpZM4YbmnZ>
.
|
tried this pull request but the issue remains the black screen is im about click the hide/show statusbar button, the screen recorder broken, but you can still see the issue |
cordova plugin add |
@mrbdrm
|
@nelsyeung
|
It works for me, thanks ! |
I would love to know why this particular commit works yet the latest on this repo does not... Was this particular fix undone by another commit after the fact? If so why? Using cordova-android 10 on the latest and greatest of everything... this particular commit is the only thing that seems to behave properly |
@juuulienr do you know? |
@dogofpavlov i have check the commit and all the modifications from the recent one but i can't find what is fixing this bug |
@juuulienr thanks for the reply... yeah I was hoping to figure out what the difference is and copy it into the latest, if you find out I'd appreciate the info, i'll do likewise |
@dogofpavlov yes of course! I don't have a lot of time now, i will probably look this summer unless someone finds before. |
Seems like this issue occurs on the latest version v3.0.0. Do we have any workaround to fix this input hide when keyboard overlays?? |
I am having an input text box at the bottom of the page which on clicked, the keyboard appears and the text box goes behind the keyboard. This doesn't happen when I remove the cordova status bar plugin. I tried many solution that involves adding the cordova keyboard plugins but didnt work.
The text was updated successfully, but these errors were encountered: