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

Comments

Projects
None yet
10 participants
@bassettsj
Copy link

bassettsj commented Jan 8, 2015

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

This comment has been minimized.

Copy link

callmephilip commented Feb 17, 2015

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

@clickonchris

This comment has been minimized.

Copy link

clickonchris commented Mar 24, 2015

+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

This comment has been minimized.

Copy link

Fayozjon commented Mar 24, 2015

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

tlancina commented Apr 20, 2015

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?

@bassettsj

This comment has been minimized.

Copy link
Author

bassettsj commented May 1, 2015

@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 label May 1, 2015

@bassettsj

This comment has been minimized.

Copy link
Author

bassettsj commented May 1, 2015

@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

This comment has been minimized.

Copy link
Author

bassettsj commented May 1, 2015

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

This comment has been minimized.

Copy link

oriodesign commented Jun 4, 2015

@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

This comment has been minimized.

Copy link
Author

bassettsj commented Jun 4, 2015

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

This comment has been minimized.

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 label Apr 27, 2016

@tlancina tlancina removed their assignment Apr 27, 2016

@jgw96

This comment has been minimized.

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 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.