Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

iOS input bug #17

Closed
fedotxxl opened this issue Oct 23, 2012 · 8 comments
Closed

iOS input bug #17

fedotxxl opened this issue Oct 23, 2012 · 8 comments
Assignees

Comments

@fedotxxl
Copy link

onTouchStart you are calculating element position. onTouchEnd you are getting element by this position. When user focuses input iOs displays keyboard and if input was in the bottom of screen iOs scrolls screen down to make input at the top of screen. So when you are getting element by onTouchStart positions you are obtaining wrong element because original input was scrolled to the top

May be the same bug is presented on Android.

@mattcg
Copy link
Contributor

mattcg commented Oct 24, 2012

As of 51e5fa0 FastClick no longer uses coordinates and elementFromPoint. Will you retest with the latest version please? If you have a test case please submit it. All our test cases are in tests/.

@ghost ghost assigned mattcg Oct 24, 2012
@fedotxxl
Copy link
Author

Checked on latest version - bug is still not fixed.

Just make input field and big block link. Then scroll input down and focus it

May be disable fastClick for input fields (make an option)

@mattcg
Copy link
Contributor

mattcg commented Oct 26, 2012

Just make input field and big block link. Then scroll input down and focus it

I'm sorry, I don't understand that. Could you put an example on codepen.io or jsfiddle please?

What version of iOS are you running and is it an iPad or an iPhone?

@fedotxxl
Copy link
Author

http://jsfiddle.net/agH7R/5/

iPhone 5.1.1

Scroll input field to bottom of screen ( http://ge.tt/1tliDIQ/v/0 ) and then click on it. I've got following behaviour: screen jumps but keyboard is not displayed and input is not focused.

@mattcg
Copy link
Contributor

mattcg commented Oct 26, 2012

I can't reproduce this. If I scroll the input field to the bottom of the screen as in your screenshot then just tapping on the input field brings up the keyboard correctly.

@samgiles
Copy link
Contributor

@fedotxxl I wonder if there is any browser caching of an old script? The new version doesn't try and calculate element positions anymore. (< @mattcg Is that correct :P)

@mattcg
Copy link
Contributor

mattcg commented Oct 26, 2012

That is indeed correct :)

@mattcg
Copy link
Contributor

mattcg commented Nov 8, 2012

Closed due to lack of interest from reporter and inability to reproduce.

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

No branches or pull requests

3 participants