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

bug: Erratic content scroll when textarea has focus #2901

Closed
bassettsj opened this issue Jan 8, 2015 · 12 comments
Closed

bug: Erratic content scroll when textarea has focus #2901

bassettsj opened this issue Jan 8, 2015 · 12 comments
Labels
needs: reply the issue needs a response from the user

Comments

@bassettsj
Copy link

Type: bug

Platform: ios 8 browser

### Steps to reproduce: - focus on textarea element - while focused touch and drag outside of the element and watch the weird scrolling

Example codepen sandbox
Screencast of the behaviour

@callmephilip
Copy link

I am seeing the same issue with both textarea and input[type="text"]
Platform: Cordova on iOS 8

@clickonchris
Copy link

+1 We are also seeing this for both text areas and input[type="text"] elements on IOS 8. It also happens when the user puts focus on an input and the screen shifts automatically by programmatically scrolling the page.

@Fayozjon
Copy link

Christopher

http://lilwall.ca/robot_strategii

24.03.2015, 16:28, "Christopher G Johnson" notifications@github.com:+1 We are also seeing this for both text areas and input[type="text"] elements on IOS 8.

—Reply to this email directly or .

@tprinty
Copy link

tprinty commented Apr 13, 2015

I too am seeing this issue. If there are two textareas on the screen the app scrolls to the second one.

@tlancina
Copy link
Contributor

Hey I'm unable to reproduce using the provided codepen, can anyone test out the latest nightly and tell me if this is still happening?

@tlancina tlancina added the needs: reply the issue needs a response from the user label Apr 20, 2015
@bassettsj
Copy link
Author

@tlancina Sorry for the delayed response... updating to the nightly in code pen and will see if it is reproducible, if not will close straight away.

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label May 1, 2015
@bassettsj
Copy link
Author

@tlancina I am able to reproduce the bug. I have uploaded a screencast reproducing the issue to youtube. I wish I could show where my finger was on the screen in this screencast.

It happens when the textarea is focused, I attempt to scroll the screen, then I get strange scrolling behavior.

@bassettsj
Copy link
Author

There is obviously a lot going on with the scroll view with things like:

scrollView.js:802

  self.touchMove = function(e) {
     if (self.options.freeze || !self.__isDown ||
        (!self.__isDown && e.defaultPrevented) ||
        (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
        return;
      }

      if ( !self.__hasStarted && ( ionic.tap.containsOrIsTextInput(e.target) || e.target.tagName === 'SELECT' ) ) {
        // the target is a text input and scroll has started
        // since the text input doesn't start on touchStart, do it here
        self.__hasStarted = true;
        self.doTouchStart(getEventTouches(e), e.timeStamp);
        e.preventDefault();
        return;
      }
 ....
 }

I would like to try to help create a test for this issue, but not sure where the best place would be. Looking at the scrollView.unit.js, it seems like the place to start, but this is a relatively difficult condition to test. Any recommendations on where you think it would be good to start?

@oriodesign
Copy link

@bassettsj did you find a solution? I have the same problem with textarea on ionic v1.0.0. When a textarea has focus on touch move (only on the textarea) the whole webview scrolls (tested on iPhone5 iOS 8.3).

@bassettsj
Copy link
Author

Within our applicantion we have a workaround, but not really a great one. It would be best to look into the source scrollview code...

@jgw96
Copy link
Contributor

jgw96 commented Apr 27, 2016

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

@jgw96 jgw96 added the needs: reply the issue needs a response from the user label Apr 27, 2016
@tlancina tlancina removed their assignment Apr 27, 2016
@jgw96
Copy link
Contributor

jgw96 commented May 3, 2016

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!

@jgw96 jgw96 closed this as completed May 3, 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
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

10 participants