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

Cursor does not follow input when scrolling with $ionicScrollDelegate on iOS #2244

Closed
AgDude opened this issue Sep 19, 2014 · 16 comments
Closed

Comments

@AgDude
Copy link

AgDude commented Sep 19, 2014

This is the same problem as described in #26 and #1063. It seems that it was fixed for scrolling by the user, but if the scroll is done programatically the problem still occurs.

here is a snippet from a directive:

var scroller = $ionicScrollDelegate.$getByHandle('my-handle'),
      setTop = function(){
        var top = element[0].getBoundingClientRect().top;
        if ( top > 62){ scroller.scrollBy(0, top - 62, true); }
      };

When setTop is called, the scroll happens, but cursor stays in the original position (no longer over the input).

@sloops77
Copy link

Hi, just upgraded to beta14. This fix screws up my chat app that where the selected input is outside the scroll area (in a footer). By screws up I mean: removes focus from the input. Even better because I hook into onBlur events and setFocus i get into an infinite loop. IMHO blurring of activeElements would be better achieved as a directive rather than on the raw scrollDelegate API which should just do what it says on the tin (manage the scroll area).

@cquartier
Copy link

I agree with @sloops77, I have a chat-based app and have the exact same problem with this fix

@pulakb
Copy link

pulakb commented Jan 13, 2015

@sloops77 can you please share the solution in codepen?

@sloops77
Copy link

Unfortunately the way i've fixed this is by using a fork of ionic (or hack your copy of ionic).

see this commit on my own fork sloops77@c96af22. you can cherrypick it if u like.

Note that my fork of ionic also contains commits for trigger.io support which you probably dont want

@adamdbradley adamdbradley reopened this Feb 6, 2015
@adamdbradley
Copy link
Contributor

@AgDude Would you be able to put together a codepen replicating the issue? Thanks

@adamdbradley adamdbradley added the needs: reply the issue needs a response from the user label Feb 17, 2015
@Ionitron
Copy link
Collaborator

Greetings @AgDude!

My sensors indicate a reply was requested, but we have not received one yet, I am using my robot powers to close this issue. However, if you are still experiencing this issue, please feel free to reopen it by creating a new issue, and include any examples or necessary information.

Thank you for allowing me to assist you.

@Ionitron Ionitron added ionitron:closed and removed needs: reply the issue needs a response from the user labels Mar 19, 2015
@kunj77
Copy link

kunj77 commented Jan 13, 2016

I am facing the exact same issue. Is there a solution for this yet?

@Stephs15
Copy link

I am facing this same issu in android. Any solutions?

@piyushmanurkar
Copy link

piyushmanurkar commented May 30, 2016

Any update on this??? I am facing the exact same issue in iOS...

@VinceOPS
Copy link

VinceOPS commented Jun 9, 2016

Same here with ionic 1.3 and iOs 9.3...

@VinceOPS
Copy link

Hi there!
Just to say that the issue also exists on Android with overflow-scroll set to false

@jdnichollsc
Copy link

same issue with iOS 10 and ionic 1.3

@ManivannanP
Copy link

ManivannanP commented Jul 26, 2017

I faced the same issue in all ios devices with ionic 1

@VinceOPS
Copy link

Looks like it's a bug from webkit in Safari mobile:
https://bugs.webkit.org/show_bug.cgi?id=138201#c5

(http://openradar.appspot.com/18819624)

It will probably never be fixed (lasting since iOS 7).
The only workaround (given by the community) seems to consist in hiding the cursor by triggering blur(), and then focusing again (focus()) when scroll is done...

@JaswinderImmanent
Copy link

JaswinderImmanent commented Sep 14, 2017

I am facing the same issue.The input field cursor scroll with screen in IOS device in ionic 1 and IOs 10.
Unable to find any solution.Please help as soon as possible.

Thanks in advance.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 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 2, 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