Content stuck after anchorscroll

I’m using anchorscroll to scroll to an element on the page.


     <a ng-click="scrollTo('foo')">Click me!</a>
<div id="foo">Here you are.</div>


.controller('MyCtrl', function($scope, $location, $anchorScroll) {
  $scope.title = 'Ionic';

$scope.scrollTo = function(id) {

After clicking the link, the content view seems to get stuck. You can scroll down further than the element, but you can’t scroll up past the element.

I’ve tried reproducing this on vanilla Angular, and it doesn’t seem to occur there. Any way to ‘unstick’ the content after using anchorscroll?

Hey @coen_warmer, unfortunately anchorScroll won’t work with our scroll system, but we are working on a separate solution:

Great. Following this with interest!

In the mean time, you can add ‘overflow-scroll=true’ to the <content> tag to make the scroll not stick after using anchorscroll.

1 Like