ionic-team / ionic-plugin-keyboard

Ionic Keyboard Plugin for Cordova
Apache License 2.0
610 stars 276 forks source link

disableScroll doesn't work on latest iOS on iPhone 6 #90

Open batuhan opened 9 years ago

batuhan commented 9 years ago

Hi,

I've tried this plugin a while ago and it was working perfectly, I tried it today and somehow the screen bounces when the keyboard is active.

Code I'm using to activate the feature (this runs inside $ionicPlatform.ready()): cordova.plugins.Keyboard.disableScroll(true);

This is what happens when an input is focused: http://vitrin.io/static/ionic-keyboard-bug-demo.html

Am I doing something wrong?

Thanks.

batuhan commented 9 years ago

It's working correctly now. Wonder what was the issue.

batuhan commented 9 years ago

Started experiencing the same issue. Is this related to the plugin or something else?

Grigorius commented 9 years ago

Are you using WKWebView ?

batuhan commented 9 years ago

This issue appeared before that too but yes. That could be the reason why it returned. 

On Fri, May 29, 2015 at 3:50 PM, Grigorius notifications@github.com wrote:

Are you using wkwebview ?

Reply to this email directly or view it on GitHub: https://github.com/driftyco/ionic-plugin-keyboard/issues/90#issuecomment-106794193

bFlood commented 9 years ago

I see the same thing. Using AppGyver but I don't think it uses WKWebView

batuhan commented 9 years ago

We don't use WKWebView anymore and still have this issue.

eroh92 commented 9 years ago

I am having the same issue in the iPhone 6 simulator, iOS 8.4. No matter how many times I call disable scroll, it bounces. Randomly, it will work.

eroh92 commented 9 years ago

Adding this seems to resolve it:

  $scope.$on('$cordovaKeyboard:show', function(){
    $cordovaKeyboard.disableScroll(true);
  });

Note: I'm using $cordovaKeyboard from ng-cordova.

eroh92 commented 9 years ago

Unfortunately, the issue has returned and I am not using WKWebView. I have disableScroll all over the codebase and nothing seems to be helping? @batuhan @bFlood were you able to get to the bottom of this?

bFlood commented 9 years ago

no, not at all. and the keyboard randomly crashes the app as well. I wish appgyver would spend some time on something as important as the keyboard

jason-engage commented 8 years ago

@tlancina Tim, if I send you an invite to a private bitbucket repo, can you build it and verify the form bug on IOS? If so, plz send me an email address that I can send you the info and I trust ya'll will keep my code private. Cheers

tlancina commented 8 years ago

@jason-engage that should work fine, bitbucket is free to sign up right? Email is tim at ionic.io, thanks!

jason-engage commented 8 years ago

Yeah its free. You'll have the invite to join my repo by tomorrow morning.

gregavola commented 8 years ago

Has anyone fixed this issue yet?

eroh92 commented 8 years ago

@tlancina @jason-engage, have you gotten to the bottom of this? Happy to help reproduce if not.

jason-engage commented 8 years ago

Nope, I haven't solved it yet.

On Tue, Oct 13, 2015 at 12:55 AM, Rob Eroh notifications@github.com wrote:

@tlancina https://github.com/tlancina @jason-engage https://github.com/jason-engage, have you gotten to the bottom of this? Happy to help reproduce if not.

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic-plugin-keyboard/issues/90#issuecomment-147601136 .

[image: ENGAGE] http://www.engageify.com/

niyando commented 8 years ago

I can confirm this. disableScroll isn't working on iphone 6. It does work for older versions (5, 5s)

patrickhofer commented 8 years ago

Yes, for me as well, any update on this? @tlancina

patrickhofer commented 8 years ago

I solved this issue by adding <script>window.cordova = {};</script> before every script in index.html. Seems like window.cordova isn't defined... It's a hack, but it works 😄

jetma commented 6 years ago
window.addEventListener('native.keyboardshow', function(event) {
    // IMPORTANT!! 
    $timeout(function() {
        $cordovaKeyboard.disableScroll(true);

        // find your own elements and set height to 100%
        var el = angular.element('.modal-backdrop.active ion-content');
        if (el) {
            el.css('height', '100%');
        }
    }, 100);
});