Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input Focus Scroll Padding First Tap / Entry #8844

Closed
duncanreid opened this issue Oct 21, 2016 · 1 comment
Closed

Input Focus Scroll Padding First Tap / Entry #8844

duncanreid opened this issue Oct 21, 2016 · 1 comment
Assignees

Comments

@duncanreid
Copy link

Short description of the problem:

RC1, iOS, testing on device.

Seems as though when you tap into an input or textarea the first time that padding is not added to the scroll-content div. I believe this is due to the fact that this._scrollPadding is initially undefined.

Again this only seems to happen on the first tap, after which, this._scrollPadding is set.

Steps to reproduce:

  1. Load up basic v2 tabs project
  2. Add a bunch of inputs or textareas that will go below the fold of the keyboard.
  3. Tap into an input that will show up below the keyboard
  4. Keyboard will animate into position but your input will still be underneath it.

ionic-angular/components/content/content.js

Content.prototype.addScrollPadding = function (newPadding) {
        if (newPadding > this._scrollPadding) {
            // console.debug('content addScrollPadding', newPadding);
            this._scrollPadding = newPadding;
            this._scrollEle.style.paddingBottom = newPadding + 'px';
        }
};

adding an or allows it to run through.

if (newPadding > this._scrollPadding || this._scrollPadding == undefined) {

Which Ionic Version? 1.x or 2.x
2.x RC1

@kabus202
Copy link

@duncanreid thanks for the fix dude

@manucorporat manucorporat self-assigned this Oct 22, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants