ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Bug: iOS Input in popup hidden by keyboard (Ionic Keyboard)

Open cmellinas opened this issue 11 years ago • 32 comments

Type: bug

Platform: ios 8 webview

Hello,

When using ionic Keyboard with cordova.plugins.Keyboard.disableScroll(true);

And using the Ionic doc Popup (first example) : http://ionicframework.com/docs/api/service/$ionicPopup/

There is an issue with the input only on IOS, the keyboard hides the input (it's not the case for modals or views inputs, only for popups).

Temporary solution : using cordova.plugins.Keyboard.disableScroll(false) when the popup show And reuse cordova.plugins.Keyboard.disableScroll(true) when the popup is closed

I use the last plugins versions (ionic 1.1.0 and Keyboard 1.0.5)

cmellinas avatar Aug 31 '15 10:08 cmellinas

Hi,

I am using iOS 9.1 webview.

I also have the ionic Keyboard plugin configured the same way, and the $ionicPopup with an input is hidden by the keyboard. I do not have this issue on android.

I have come to the same temporary solution as @mellinas, which is undesirable as it makes the whole view (nav-bar included) scroll-able while the popup is open.

I'm using ionic v1.1.0 and Keyboard v1.0.6

jwt02180 avatar Oct 27 '15 14:10 jwt02180

I'm also experiencing this bug, using the same fix as @cmellinas as well.

bdoooh avatar Dec 15 '15 15:12 bdoooh

+1

jordantomax avatar Apr 07 '16 00:04 jordantomax

+1

tgensol avatar Apr 09 '16 01:04 tgensol

If found a less undesirable way to work around this issue by manually moving the popup when the keyboard appears:

JS:

if (cordova.platformId === 'ios') {
   window.addEventListener('native.keyboardshow', function () {
      movePopupFromContainerList(document.getElementsByClassName('input-popup popup-container'), true);
   }
   window.addEventListener('native.keyboardhide', function () {
      movePopupFromContainerList(document.getElementsByClassName('input-popup popup-container'), false);
   }

   function movePopupFromContainerList(list, up) {
      if (list.length) {
         var popup = list[0].childNodes[0];
         popup['style'].bottom = up ? '130px' : '0px';
      }
   }
}

this.$ionicPopup.prompt({
   title: ...,
   ...,
   cssClass: 'input-popup'
});

CSS:

.platform-ios {
  .input-popup.popup-container .popup {
    position: relative;

    -webkit-transition: bottom 0.3s ease-in-out 0s;
    transition: bottom 0.3s ease-in-out 0s;
  }
}

johnnyoin avatar Apr 14 '16 12:04 johnnyoin

Hello all! Is this still an issue with the latest version of ionic? Thanks!

jgw96 avatar May 12 '16 17:05 jgw96

@jgw96 Yes this is still an issue.

johnnyoin avatar May 17 '16 11:05 johnnyoin

+1, super annoying ...

AdrienDC avatar Jun 06 '16 08:06 AdrienDC

+1

przemkow avatar Jun 06 '16 12:06 przemkow

Greetings @cmellinas!

My sensors indicate a reply was requested, but as we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.

Thank you for allowing me to assist you.

Ionitron avatar Jun 12 '16 02:06 Ionitron

Still a problem, please reopen.

jordantomax avatar Jun 15 '16 19:06 jordantomax

+1

slorber avatar Jun 28 '16 15:06 slorber

+1

douglasjunior avatar Jul 08 '16 20:07 douglasjunior

+1

luco avatar Jul 13 '16 18:07 luco

+1

marcioibm avatar Aug 16 '16 12:08 marcioibm

+1

wcustodio avatar Aug 19 '16 16:08 wcustodio

+1. I'm not facing that problem with popup but I have issue when open keyboard in a long form, the keyboard overlap the form and I can not scroll. I try to use cordova.plugins.Keyboard.disableScroll(false) but sometimes it works, sometimes not. Please fix it.

BraveVN avatar Aug 30 '16 10:08 BraveVN

Hi All, I am also facing same issue, when popup is shown, the keyboard gets opened which hides the input field. Any solution please? Thanks

mashah1 avatar Aug 31 '16 20:08 mashah1

Same issue, is this fixed?

suiz0 avatar Sep 28 '16 17:09 suiz0

Still occured..

A tricky solution to fix it :

.platform-ipad.keyboard-open {
    .popup-container {
        padding-top: 50px;
        align-items: flex-start;
    }
}

fmoutawe avatar Oct 26 '16 12:10 fmoutawe