Skip to content

Commit

Permalink
fix(scrollView): cloned input for keyboard-scroll now matches original
Browse files Browse the repository at this point in the history
Closes #1721
  • Loading branch information
rysi3k authored and ajoslin committed Jul 7, 2014
1 parent da8a24d commit 5da1ecd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion js/utils/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ ionic.tap = {
clonedInput.placeholder = focusInput.placeholder;
clonedInput.type = focusInput.type;
clonedInput.value = focusInput.value;
clonedInput.className = 'cloned-text-input';
clonedInput.style = focusInput.style;
clonedInput.className = focusInput.className;
clonedInput.classList.add('cloned-text-input');
clonedInput.readOnly = true;
focusInput.parentElement.insertBefore(clonedInput, focusInput);
focusInput.style.top = focusInput.offsetTop;
Expand Down
2 changes: 1 addition & 1 deletion scss/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ input[type="file"] {
.previous-input-focus,
.cloned-text-input + input,
.cloned-text-input + textarea {
position: absolute;
position: absolute !important;
left: -9999px;
width: 200px;
}
Expand Down

1 comment on commit 5da1ecd

@adamdbradley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using the !important? Have you tried all the other alternatives before trying this?

Please sign in to comment.