-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Beta 14: collection-repeat filter focus problem with $ionicScrollDelegate #2745
Comments
Yup, I'm experiencing the exact same problem. Seems like |
it is because now all the scrolling function add 1 more line "blurAll()". To avoid this issue, you can just getScrollView().scrollTo(0, 0, !!shouldAnimate).
|
Nice, thanks very much for that. I presume this side effect is still unintended for |
Probably It's me, but I'm still losing focus when scrolling up. I'm invoking Using What am I missing? Could you please update your codepen? I'd be very glad :) |
It works for me with exactly that second line I'm afraid - jumps back to the top on change if you've scrolled down. Here's an updated codepen with the workaround: http://codepen.io/NoelLH/pen/EayGYd It seems fine in my actual app where it's a bit more complicated too. |
Ok, I found it. Just in case someone else has the same problem, I had to setup a delegate handle on my
Then in the controller:
Hope this helps someone else! |
Beta 14 seems to have introduced a bug with
collection-repeat
.My use case is very similar to the demo here except that I also want my large collection to scroll to the top of the list each time the filter text is changed, on the fly.
(As an aside, I think this might be better default behaviour? Without it, scrolling down a long list then filtering can mean that results are hidden from view off the top of the screen.)
I forked the collection-repeat demo codepen but had to remove most of the data since it appears to break on the actual Codepen site, as somebody has commented.
All I've changed from the demo is:
$scope.scrollTop()
- this was already referenced in anng-change
in the demo but just not in placeThe function looks like
Here is it:
Expected/ working/ beta13 behaviour: list scrolls up but filter box keeps focus so you can keep typing.
Actual/ broken/ beta14 behaviour: the filter and scroll to top work, but the box loses focus, making it practically unusable for searches longer than 1 character.
The text was updated successfully, but these errors were encountered: