Skip to content

ionic2 slides keyboard bug #5571

Closed
Closed

Description

@jurienhamaker

Short description of the problem:

I got a couple of slides, and the last one of them has a login form. whenever I try to type in the input fields, the keyboard pops up and the slides are broken, they're auto resized to the space left, and after closing the keyboard they stay that way.

What behavior are you expecting?

I am expecting it to be pushed up (like usual phone behavior I guess?) and make it possible to use form fields in slides.

Steps to reproduce:

  1. Create a view with slides
  2. add a form to one of the slides (even one input fiels will do)
  3. Tap the input field, tada.
        <ion-slide>
            <img src="img/superbuddy_logo.png" class="slide-img"/>
            <h2 class="slide-title">Let's get started!</h2>
            <ion-item>
                <ion-label>username</ion-label>
                <ion-input></ion-input>
            </ion-item>
            <ion-item>
                <ion-label>password</ion-label>
                <ion-input type="password"></ion-input>
            </ion-item>
            <button full>Log in</button>
            <div class="divider"></div>
            <button outline>
                <ion-icon name="logo-facebook"></ion-icon>
                Log in with facebook
            </button>
            <div class="divider"></div>
            <button clear>Create new account?</button>
        </ion-slide>

Ionic Version: 1.x / 2.x
2

Browser & Operating System: iOS / Android / Chrome
All of them.

Run ionic info from terminal/cmd prompt:

Cordova CLI: Not installed
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
OS:
Node Version: v5.5.0

Activity

  1. self-assigned this
    on Feb 23, 2016
  2. added this to the 2.0.0-beta.5 milestone on Feb 23, 2016
  3. alpotapov commented on Mar 18, 2016

    @alpotapov

    Any progress on this issue?

  4. EvanWillms commented on Apr 10, 2016

    @EvanWillms

    Given this description of space being suddenly claimed by the keyboard when an input field is tapped and then not released afterward, this sounds like another effect of #5432.

    @HazeDevelopment, @alpotapov: You might be able to make use of the workaround I found to let the keyboard slide over the content, preventing it from getting permanently squished:
    https://forum.ionicframework.com/t/disable-scroll-ionic2-ios9-not-working/44847/5?u=evanwillms

    @brandyscarney: I would guess that this issue shares a root cause with #5432 and is unrelated to potential work in #6007, but you should probably have someone more familiar verify.

  5. jgw96 commented on Apr 12, 2016

    @jgw96
    Contributor

    related to #5744

  6. dylanvdmerwe commented on Apr 20, 2016

    @dylanvdmerwe
    Contributor

    An plunkr example of a form with various input components within an <ion-slides>: http://plnkr.co/edit/i0MIv8mlQ5WljUJxlBAs?p=preview

    The form creates all sorts of chaos. Granted this is quite a big form, but this is just an example.

    • Cannot scroll through the form.
    • Pager moves when the form scrolls.
    • Swiping back and forth messes between pages while capturing input messes with the pager, the vertical padding and scroll position of the other slides.
  7. jgw96 commented on Apr 20, 2016

    @jgw96
    Contributor

    Hey everyone! Just wanted to let the community know that we are currently making alot of changes to slides for beta.5, along with some much better docs, so look out for fixes for slides in beta.5! (:

  8. 37 remaining items

  9. Daskus1 commented on Jan 2, 2017

    @Daskus1

    Is there any progress on this issue? I have the same problem, when typing on an input inside a slide the slide is broken

  10. hotforfeature commented on Feb 3, 2017

    @hotforfeature
    Contributor

    I've been using <ion-slides> with form inputs for a while now. The problem is that the slider wasn't designed for use with assistive scroll.

    I have a workaround described in #10258. It involves making the slider ion-fixed and using <ion-content> inside each <ion-slide>.

    The one caveat is that <ion-content> also wasn't designed to deal with multiple content elements on a page. There's a patch in the linked issue that you'll want to call on your ViewController when you create your component.

  11. sufiiiyan commented on Apr 7, 2017

    @sufiiiyan

    I'm still facing this issue
    when I is use input with ion-slide.
    Is there any solution or any updates

    ordova CLI: 6.5.0
    Ionic Framework Version: 2.2
    Ionic CLI Version: 2.2.1
    Ionic App Lib Version: 2.2.0
    Ionic App Scripts Version: 1
    ios-deploy version: Not inst
    ios-sim version: Not install
    OS: Windows 8.1
    Node Version: v6.10.0
    Xcode version: Not installed

  12. pablozandona commented on May 11, 2017

    @pablozandona

    +1

    Cordova CLI: 6.5.0
    Ionic Framework Version: 3.1.1
    Ionic CLI Version: 2.2.3
    Ionic App Lib Version: 2.2.1
    Ionic App Scripts Version: 1.3.4
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Linux 4.10
    Node Version: v5.12.0
    Xcode version: Not installed

  13. douglasmoraisdev commented on Nov 6, 2017

    @douglasmoraisdev

    This workaround worked for me in app.modules.ts:

    imports...
    
    @NgModule({
    
    	declarations: [
    		...
    	],
    
            imports: [
    		IonicModule.forRoot(MyApp, {
    			scrollAssist: false
    		}),
    		...
    	],
    

    Source:
    https://forum.ionicframework.com/t/disable-scroll-ionic2-ios9-not-working/44847/9

  14. krunal9421 commented on Nov 23, 2017

    @krunal9421

    I am facing this issue in android case. Any solution for it.

  15. aymehri commented on Dec 3, 2017

    @aymehri

    Hello i'm facing the same issue. Any update?

  16. fishme commented on Feb 1, 2018

    @fishme

    I have the same issue. 2 years old bug...

  17. polfernandez commented on Feb 21, 2018

    @polfernandez

    Hi guys, I still have the issue. The keyboard moves the whole screen up when it appears. Someone has solved it? :'(

    I have the same issue ONLY on iOS

    Find attached 2 pictures showing the problem:

    --- Normal Screen ---
    captura de pantalla 2018-02-21 a las 11 36 43

    --- Screen goes up when keyboard appears ---
    captura de pantalla 2018-02-21 a las 11 36 53

    My code:

    <ion-header>
      <ion-navbar>
      </ion-navbar>
    </ion-header>
    
    <ion-content padding>
      <ion-list no-lines> 
          <ng-container>
          </ng-container>
      </ion-list>
    </ion-content>
    
    <ion-footer>
     <ion-toolbar>
      <ion-item>
        <div item-content>
          <ion-textarea 
                        fz-elastic
                        (ionFocus)="_onFocus($event)"
                        (ionBlur)="_onBlur($event)"
                        (ionChange)="_onChange($event)"
                        (keypress)="_onKeypress($event)"
                        [disabled]="disabled"
                        [placeholder]="placeholder">
          </ion-textarea>
        </div>
      </ion-item>
     </ion-toolbar>
    </ion-footer>
    

    IONIC INFO

        @ionic/cli-utils  : 1.12.0
        ionic (Ionic CLI) : 3.12.0
    

    global packages:

    cordova (Cordova CLI) : 6.5.0
    local packages:

      @ionic/app-scripts : 2.1.4
       Cordova Platforms  : android 6.4.0 ios 4.3.1
       Ionic Framework    : ionic-angular 3.9.2
    
    

    System:

        ios-deploy : 1.9.2 
        ios-sim    : 6.1.2 
        Node       : v8.9.1
        npm        : 2.15.12 
        OS         : macOS High Sierra
        Xcode      : Xcode 9.2 Build version 9C40b 
    
    
  18. ionitron-bot commented on Nov 1, 2018

    @ionitron-bot

    Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

    Thank you for using Ionic!

  19. ionitron-bot commented on Nov 1, 2018

    @ionitron-bot

    Issue moved to: ionic-team/ionic-v3#42

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

Metadata

Metadata

Assignees

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