Skip to content

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

Closed

Description

@cmellinas

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)

Activity

  1. changed the title [-]Bug: iOS Input in popup hidden by keyboard (Ionic Keyboard)[/-] [+]bug: Bug: iOS Input in popup hidden by keyboard (Ionic Keyboard)[/+] on Aug 31, 2015
  2. jwt02180 commented on Oct 27, 2015

    @jwt02180

    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

  3. bdoooh commented on Dec 15, 2015

    @bdoooh

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

  4. jordantomax commented on Apr 7, 2016

    @jordantomax

    +1

  5. tgensol commented on Apr 9, 2016

    @tgensol

    +1

  6. johnnyoin commented on Apr 14, 2016

    @johnnyoin

    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;
      }
    }
  7. jgw96 commented on May 12, 2016

    @jgw96
    Contributor

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

  8. added
    needs: reply
    on May 12, 2016
  9. johnnyoin commented on May 17, 2016

    @johnnyoin

    @jgw96 Yes this is still an issue.

  10. AdrienDC commented on Jun 6, 2016

    @AdrienDC

    +1, super annoying ...

  11. przemkow commented on Jun 6, 2016

    @przemkow

    +1

  12. removed their assignment
    on Jun 7, 2016
  13. 12 remaining items

  14. suiz0 commented on Sep 28, 2016

    @suiz0

    Same issue, is this fixed?

  15. fmoutawe commented on Oct 26, 2016

    @fmoutawe

    Still occured..

    A tricky solution to fix it :

    .platform-ipad.keyboard-open {
        .popup-container {
            padding-top: 50px;
            align-items: flex-start;
        }
    }
  16. BraveVN commented on Oct 27, 2016

    @BraveVN

    @Ionic team: Are you guys still working with it ?

  17. sminthsonth commented on Nov 7, 2016

    @sminthsonth

    it is definitely an issue, +1

  18. alexgalkin commented on Nov 26, 2016

    @alexgalkin

    Issue is still valid

  19. Rambatino commented on Nov 26, 2016

    @Rambatino

    @jgw96 can this be reopened as it is still an issue with rc 3

  20. lehresman commented on Jan 27, 2017

    @lehresman

    @ivelfan has the right solution. This worked like a charm. Thanks!

  21. Nightbr commented on Mar 16, 2017

    @Nightbr

    This is still an issue in ionic 1.3.2
    @ivelfan's fix should be add to the ionic main CSS ?

  22. AshleyDeng commented on Apr 7, 2017

    @AshleyDeng

    In most cases, using Ionic is a pleasant. But when it comes down to some minor yet annoying bugs, sometimes it would not be fixed or acknowledged. Another example is iOS input cursor bugs.

    Frustrated indeed.

  23. pavelety commented on Oct 12, 2017

    @pavelety

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

  24. sohandhaindwal commented on Oct 23, 2017

    @sohandhaindwal

    Same issue is here. I have study on that but not correct solution yet. I saw Ionic team is not noticed that point. I found that ionic UI is not good for IOS , lots of issues are coming in IOS. very bad experience with ionic . from last two months I am finding the that issue solution but .......Somebody have any solution. please help me my app almost complete but without that its not done . I am using ionic1. I am set chat input into footer bar when i focus on input then keyboard covered my input . Please help me. ionic team please fixed that issue.

  25. DenisTis commented on Jun 28, 2018

    @DenisTis

    The solution proposed does not solve the issue completely:
    .platform-ios.keyboard-open .popup-container {
    padding-top: 50px;
    align-items: flex-start;
    }

    Once keyboard is displayed, it puts additionally whole "view-container" to the top, overlaying ios toolbar with battery indicator, etc.
    Once keyboard is hidden, "view-container" does not come back and stays overlayed. Very annoying.

  26. ionitron-bot commented on Sep 1, 2018

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  27. locked and limited conversation to collaborators on Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions