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

Workaround for ios 11 bug #344

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions dist/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,13 @@
// used to check if an update is actually necessary on window.resize
clientWidth = ta.clientWidth;

// prevents scroll-position jumping
overflows.forEach(function (el) {
el.node.scrollTop = el.scrollTop;
});
// This commented out code breaks causes the keyboard to overlay the input box on IOS 11
/*
// prevents scroll-position jumping
overflows.forEach(el => {
el.node.scrollTop = el.scrollTop
});
*/

if (docTop) {
document.documentElement.scrollTop = docTop;
Expand Down
2 changes: 1 addition & 1 deletion dist/autosize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,14 @@ function assign(ta) {
// used to check if an update is actually necessary on window.resize
clientWidth = ta.clientWidth;


// This commented out code breaks causes the keyboard to overlay the input box on IOS 11
/*
// prevents scroll-position jumping
overflows.forEach(el => {
el.node.scrollTop = el.scrollTop
});
*/

if (docTop) {
document.documentElement.scrollTop = docTop;
Expand Down