meteoric / meteor-ionic

Ionic components for Meteor. No Angular!
http://meteoric.github.io
MIT License
1.51k stars 219 forks source link

Error on keyboard on iOS 9 #321

Open jerocosio opened 8 years ago

jerocosio commented 8 years ago

Hi, I am having some trouble with the keyboard on iOS 9, the thing is that when I open the keyboard and use the arrows in it to move between the fields and then I click done there is like this 'space' left there, it looks like a class or something doesn't gets removed or something, I made a gif to show you what I'm talking about, and I hope someone can help me out with this, as I am just days from releasing my production version and this came out.

*This error doesn't occur on iOS 8

errorionic480

pors commented 8 years ago

I have the same issue (also on iOS 9). When the keyboard is open the content div is as follows:

<div class="content padding overflow-scroll has-header" style="bottom: 302px;">

When I close the keyboard it is:

<div class="content padding overflow-scroll has-header" style="bottom: 260px;">

This fix, found in issue #89, works for me:

.content.overflow-scroll.has-header {
    bottom: 0px !important;
}

But it is a hack of course.

jerocosio commented 8 years ago

Thank you @pors this resolved it for the moment!

jerocosio commented 8 years ago

With this fix I have a new error, now the last two inputs don't scroll correctly into the view as you can see on the images, is there anyway to fix this? Thanks in advance! screen shot 2015-09-28 at 10 52 18 a m screen shot 2015-09-28 at 10 52 32 a m screen shot 2015-09-28 at 10 52 38 a m screen shot 2015-09-28 at 10 52 48 a m screen shot 2015-09-28 at 10 52 52 a m

daveeel commented 8 years ago

+1

william-bratches commented 8 years ago

Having the same issue with keyboard blocking inputs on a page similar to yours- removing the ionic package and displaying the page fixes the problem, but then adding the meteoric-ionic framework again recreates this problem. It's definitely a problem with meteoric-ionic.

william-bratches commented 8 years ago

Figured out the source of the issue on my end. In components/ionKeyboard.js, there's a function call that actually disables keyboard scrolling on startup.

Meteor.startup(function () {
  if (Meteor.isCordova) {
    IonKeyboard.disableScroll();
  }
});

I wrote a custom implementation of meteoric-ionic that simply comments out this line, and it fixed the issue for me. The IonKeyboard object is attached to the window object, so if you want to save yourself the trouble of creating your own custom package, you can probably just call "this.IonKeyboard.enableScroll()" in a Meteor.onRendered call or something similar.

I'm curious as to why this is here in the first place - is the intended behavior for us to enable scrolling in our own startup function? Might want to include some documentation that references this behavior.

danlg commented 8 years ago

@pors which view are you using UIWebView or WKWebview ? if WKWebview, which implementation, there are so many forks for meteor and none of them is working out-of the-box for me... thanks

pors commented 8 years ago

@danlg I had this issue on iOS, and I use the default choice in Xcode, which is "blank". It works will all recent version of Meteor.