简体   繁体   中英

anchor scroll with angular/ionic breaks layout and scrolling up is not possible anymore

This is my code:

  if($state.current.name == "list") {
          $scope.scrollToAnchorWithinCurrentPage = function(anchor) {
              $location.hash(anchor);
              var handle = $ionicScrollDelegate.$getByHandle('img');
              handle.anchorScroll();
    };
      }

Somewhere else:

$scope.scrollToAnchorWithinCurrentPage('foo');

HTML:

  <img src="img/list/pfeil-badge.png" ng-hide="!unlocked" id="foo" ng-if="atStreet" class="pfeil-only-badge" alt="">

The content scrolls to the anchor, but scrolling up again is not possible anymore.

When i scroll down the app looks like this:

So it's possible to overscroll...

Any help much apreciated!

在此处输入图片说明

解决的办法是我必须将离子含量更改为以下内容:

overflow-scroll="true" has-bouncing="true"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM