-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Keyboard pushes the whole screen up #5432
Comments
Seeing the same issue in our app on iOS only. On device it always seems to happen, but in iOS emulator it only happens every other time or so. I am actually on ionic 1.7.14 |
Same problem here + 1 at IOS9 |
Same issues here at iOS |
fixed a similar issue for me. It might help. I also had to install the cordova and ionic-cordova typings. The keyboard doesn't move up with the keyboard though |
+1 |
In my poking around, there appear to be two systems interested in moving content out of the way when the soft keyboard is opened: the underlying native browser and the Ionic2 library itself.
Under Ionic2 defaults, however, there are additional features in place attempting to both compensate for the keyboard slideover by adding padding to the bottom of your content ('scrollAssist') and to keep the focused input element within the viewport by scrolling back to it ('autoFocusAssist'). Both scrollAssist and autoFocusAssist have nicely implemented switches in config that just don't appear to have gotten public documented yet. With both sides' behavior disabled, the native keyboard will slide up over existing content without any pushing or scrolling in an Ionic2 (beta.3) app deployed to both iOS 9.2 and Android 6.0. App level configuration sample is in the gist: @jgw96, I think there are actually two separate issues worth resolving here.
|
The Issue for me is that the ion-input (type="text") is sometimes hidden behind the keyboard if you select a text ion-input that is inside an ion-item-sliding. The Content scrolls up for just a moment and then jumps into another position. So the input is hidden by the keyboard and you can enter text into the textfield but you can't see what you typed. I've included an repository which demonstrates the issue - See: #9642 |
@alexmady and @richardshergold using the sample project I have been able to solve most of these issues just by refactoring things a little bit. The sample project had quite a bit of unneeded code, and it was not using the latest nightly (now RC4). Here is the sample code/project https://github.com/mhartington/KeyboardTest It's behaving as one would expect on android. iOS however does have issues with the input being covered. Thank you all for your patience with this, it is not an easy problem to solve. |
Thank you for the update @mhartington I have just tried you example repository on iOS and it is indeed hiding the input. Here is a gif showing the problem. Here is another gif showing how the footer should slide up and what I believe we are all looking for: thanks and looking forward to updates. |
Yes @alexmady, ios is proving to be problematic. |
You guys might want to take a look at the following SO question for several workarounds or maybe for leading you into finding an ultimate solution for this issue: http://stackoverflow.com/questions/36706398/in-ionic-2-how-to-float-an-element-above-the-keyboard-when-the-keyboard-shows |
thanks for the update @mhartington Ideally we need to match the usability of existing chat apps, we need the return button for another purpose really. Is there nothing we can do in ionic to change the behaviour of the send button so that the focus is not lost? If we were to enclose the input in a form for example, might that help with catching and preventing the loss of focus at the same time as sending the message? |
@nunoarruda - thanks for your input (no pun intended) on this however the suggest mention on SO do not solve the problem of the input losing focus after each message is sent. For example if you want to sent 5 messages you have to show and hide the keyboard 5 times, which is rather clunky compared to what people are used to with the way that many native apps work. |
Looks like there's a topic here of the Send Button closing the keyboard; I am also building a chat feature for my iOS app and want to know if this issue is one that is being looked into for RC5? I opened this exact issue a while back, #9238 Thanks! |
Hi @mhartington Is there any update on this please? I am wondering if we are we on track to have the desired keyboard/chat features in the final release of ionic 2? As I'm sure you've guessed, it's kind of a big deal! By the way, if you require anything else in the way of examples/use cases for this do please let me know any I will happily put something together. 2016 has been a great year for ionic - wishing all of the team Happy Holidays! |
Is this problem already scheduled for any milestone? Would be great to know if the solution for this is near or whether investing time into finding alternatives would be worth it. |
@mhartington did you have any progress after your experiments #5432 (comment) I created a sample app using The current @nunoarruda solution to change |
@juarezpaf It does not work. The input only appears above the keyboard after the user has started typing. |
You guys need to more concentrate on input focus. |
Hey yall, sorry for the silence, we're just returning from holidays. |
@mhartington Thanks a lot, we really appreciate the effort you and your team put into Ionic! Looking forward to the fix, if you need a test project or someone to try it out in different circumstances just let me know ;-) |
Ditto!
On Tue, 3 Jan 2017 at 15:00, Marcel van Remmerden ***@***.***> wrote:
@mhartington <https://github.com/mhartington> Thanks a lot, we really
appreciate the effort you and your team put into Ionic! Looking forward to
the fix, if you need a test project or someone to try it out in different
circumstances just let me know ;-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5432 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGVqeiW8T0X_hk_TY_9T08BQPAG9Mzfxks5rOmKHgaJpZM4HYsIN>
.
--
Kind regards,
Alexander Mady
|
Check out the last SO comment. Maybe this will help. |
Adding the following code worked perfectly fine for me: .input-cover { I still wonder whether there will be any negative consequences, but couldn't find any so far. |
@MvRemmerden Could you post a bit more context for your fix? E.g. On which element did you place that CSS? Thanks! |
@lincolnthree Sure, but actually that's all there is to it. Just paste the css code on the pages you need it and you should be fine. You can also have a look at the stackoverflow thread @cozzbie posted (http://stackoverflow.com/a/38786672). The solution I used is currently the highest voted comment. |
is this issue solved? |
no, not at all. facing the same issue with rc.5 we are using a footer with elastic textarea (like whats app chat) |
It's working for me |
Anyone tries to fix this on Ionic @wbhob: here's an UPDATE / scenario: app.js - current config
Did I missed something? |
What is the error? You need to give us some more details about what happens and what you expect, and possibly open a new issue if this is separate from the topic.
This also sounds like a support request and not a bug or feature, so please ask on the forum and Ionic Worldwide Slack.
Thanks.
…On Jan 19, 2017, 7:18 AM -0500, alexszilagyi ***@***.***>, wrote:
Anyone tries to fix this on Ionic 1.x (1.7.15) ?
app.js - current config
.run(function ($ionicPlatform, gettextCatalog, $cordovaFile) { $ionicPlatform.ready(function () { ionic.Platform.isFullScreen = false; // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard or form inputs) if (window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.disableScroll(true); cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } } } .config(['$ionicConfigProvider', function ($ionicConfigProvider){ $ionicConfigProvider.scrolling.jsScrolling(!ionic.Platform.isAndroid()); }]); // config.xml <preference name="Fullscreen" value="false" /> <preference name="DisallowOverscroll" value="true" /> <preference name="KeyboardDisplayRequiresUserAction" value="true" /> <preference name="android-windowSoftInputMode" value="stateHidden|adjustResize" /> <plugin name="ionic-plugin-keyboard" version="2.2.1" src="https://github.com/driftyco/ionic-plugin-keyboard" />
Did I missed something?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#5432 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AEPIEhJXEmfFhtzXzJC5bChWVUTGapIlks5rT1RigaJpZM4HYsIN).
|
Type: bug
Ionic Version: 2.x
Platform: ios 9 webview
My code has a
<ion-toolbar position="bottom">
with a text input inside of it. When I try to type something in there on iOS the whole page gets pushed upwards by the keyboard.The text was updated successfully, but these errors were encountered: