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

bug: Starting scroll on a label #5102

Closed
Manduro opened this issue Jan 20, 2016 · 6 comments
Closed

bug: Starting scroll on a label #5102

Manduro opened this issue Jan 20, 2016 · 6 comments

Comments

@Manduro
Copy link
Contributor

Manduro commented Jan 20, 2016

Type: bug

Ionic Version: 1.x

Platform: ios 9 browser

When scrolling starts on a label, the scroll is canceled. This occurs on iOS, haven't tested Android.

This problem is demonstrated in the following codepen: http://codepen.io/manduro/pen/vLpEzx/
(Open it on iOS or in Chrome device mode)

@Manduro Manduro changed the title bug: Starting scroll on an input inside a label bug: Starting scroll on a label Jan 20, 2016
@Invision70
Copy link

+1

@DomClaxton
Copy link

I can confirm this is an issue for me too. In browser using Chrome tools and switching to touch device view. Also in IOS 8.1.3 (iPhone4s). Both instances have the form element in a modal. I can only scroll the content 'between' the range element. If your finger registers a 'hit' on top of the range then scrolling ceases. Have tried using native scrolling too - no joy.

@tomasbedrich
Copy link

I think it may be an issue in a function tapTargetElement, because label.control returns the labeled <input> even if the <label> doesn't wrap it – according to HTML5 specs. On the other hand, ele.querySelector returns only the <input> which is inside the <label> tag (source).

But I don't get the point of this condition at all (even after reading the comments – what does it mean to "ugly auto scroll"?).

The simplest solution which worked for me was to remove the condition mentioned above. Since then I haven't discovered any cons of this solution.

@Manduro
Copy link
Contributor Author

Manduro commented Feb 29, 2016

For @tomasbedrich and others running in to this: the easy fix for me was to replace all <label>'s with regular <div>'s. The downside to this is of course not being able to focus the input by tapping the label. In my case I only use a placeholder, not a real label, so it isn't much of a problem.

@jgw96
Copy link
Contributor

jgw96 commented Jan 17, 2017

This issue was moved to ionic-team/ionic-v1#184

@jgw96 jgw96 closed this as completed Jan 17, 2017
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
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

5 participants