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

1.4.0 - Textarea with long text as Listview element jumping up when typing. #6898

Closed
KrzysztofBorowiak opened this Issue Jan 7, 2014 · 2 comments

Comments

Projects
None yet
4 participants
@KrzysztofBorowiak

KrzysztofBorowiak commented Jan 7, 2014

Test page:
http://jsbin.com/IFolanOW/65/edit

Steps to reproduce:
To see page is jumping back to top - Try to type at the end of the textarea.

Platforms/browsers:
Windows 7 / Chrome Version 30.0.1599.14

jQuery Mobile and jQuery core version used:

  • jquery.mobile-1.4.0.min.js
  • jquery-1.9.1.min.js
@zordon

This comment has been minimized.

Show comment
Hide comment
@zordon

zordon Jan 16, 2014

this happens to me too, disabled autogrow.

zordon commented Jan 16, 2014

this happens to me too, disabled autogrow.

@ghost ghost assigned gabrielschulhof Jan 22, 2014

gabrielschulhof added a commit that referenced this issue Jan 23, 2014

Autogrow: Wedge open vertical space while recalculating textarea height
A div is added after the textarea and hidden at all times except during the
textarea height calculation process. During _updateHeight() its height is set to
the current height of the textarea before the textarea height is set to 0. This
will maintain the height of the document while the textarea is being resized and
seems to successfully prevent the browser from scrolling the document -
everywhere except on Android 2.3.5, where this change makes things no worse.

We should test this change extensively.

Fixes gh-6898
@allsteady

This comment has been minimized.

Show comment
Hide comment
@allsteady

allsteady Jan 24, 2014

Contributor

Hi Gabriel,

I think that your first suggest is the best solution to solve the issue.
( Save the scrollTop() before resizing the textare, and then $.mobile.silentScroll( savedScrollTop ); )

Just, I recommend using 'window.scrollTop(savedPosition)' to solve it.
See below the test site :
http://jsbin.com/EYaGIyUx/1/edit

Contributor

allsteady commented Jan 24, 2014

Hi Gabriel,

I think that your first suggest is the best solution to solve the issue.
( Save the scrollTop() before resizing the textare, and then $.mobile.silentScroll( savedScrollTop ); )

Just, I recommend using 'window.scrollTop(savedPosition)' to solve it.
See below the test site :
http://jsbin.com/EYaGIyUx/1/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment