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

Autocomplete floating when scrolling up on iOS device #33

Closed
mkok1019 opened this issue Sep 19, 2019 · 5 comments
Closed

Autocomplete floating when scrolling up on iOS device #33

mkok1019 opened this issue Sep 19, 2019 · 5 comments
Labels

Comments

@mkok1019
Copy link

Just test https://kraaden.github.io/autocomplete/ on iPhone.

When you scroll up, autocomplete overlaps the input and goes up to the screen.

@kraaden kraaden reopened this Sep 27, 2019
@kraaden kraaden added the bug label Sep 27, 2019
@nithinstany
Copy link

nithinstany commented Oct 25, 2019

Any solution for this issue to fix.

@jackkinsella
Copy link

The modification 3b63321 caused this to break severely on iPhone.

When the page is unscrolled:

Screen Shot 2019-11-06 at 15 34 06

When I scroll, now the autocomplete box for "Postleitzahl" appears about 100px below and overlaps with the street input:

Screen Shot 2019-11-06 at 15 34 32

Undoing this change fixes the issue.

@kraaden
Copy link
Owner

kraaden commented Nov 6, 2019

@jackkinsella Thank you for reporting the issue. Do you have any page where I can reproduce it? I tested the following page on iPhone 6 as well on Browserstack using 2 newest iPhones, but everything seems to work just fine:
https://kraaden.github.io/autocomplete/

If possible, let me know which iOS version you used.

@jackkinsella
Copy link

jackkinsella commented Nov 6, 2019

I created a CodePen to demonstrate: https://codepen.io/jackkinsella/pen/jOOxEdq

(It uses your library code except a change where I force IOS mode. You can then inspect with DevTools iPhone simulation)

The autocomplete is in the correct position before any scrolling happens (i.e. the first input is perfect), but after scrolling occurs (i.e. the second input), the autocomplete popup's position seems to be set to a top value that is larger than the viewable screen's height (i.e. which isn't going to play well with position:fixed). This happens because of the addition of window.pageYOffset, which is equal to the amount scrolled.

iOS version? Not sure, sorry (was a colleague's phone). I think it was the one before the X. But the issue can be reproduced in Chrome DevTools.

@rikjacobs1390
Copy link

I can also reproduce this bug on iPad (iOs 13.2). Exactly the same bug as jackkinsella describes. It' fine when the page is unscrolled. When scrolled (either by hand or triggered by the appearing of the iOs keyboard) the position of the dropdown in incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants