{"action":"created","issue":{"url":"https://api.github.com/repos/oblador/angular-scroll/issues/140","labels_url":"https://api.github.com/repos/oblador/angular-scroll/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/oblador/angular-scroll/issues/140/comments","events_url":"https://api.github.com/repos/oblador/angular-scroll/issues/140/events","html_url":"https://github.com/oblador/angular-scroll/issues/140","id":100781813,"number":140,"title":"scrollToElement fails","user":{"login":"edamron","id":5248193,"avatar_url":"https://avatars.githubusercontent.com/u/5248193?v=3","gravatar_id":"","url":"https://api.github.com/users/edamron","html_url":"https://github.com/edamron","followers_url":"https://api.github.com/users/edamron/followers","following_url":"https://api.github.com/users/edamron/following{/other_user}","gists_url":"https://api.github.com/users/edamron/gists{/gist_id}","starred_url":"https://api.github.com/users/edamron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edamron/subscriptions","organizations_url":"https://api.github.com/users/edamron/orgs","repos_url":"https://api.github.com/users/edamron/repos","events_url":"https://api.github.com/users/edamron/events{/privacy}","received_events_url":"https://api.github.com/users/edamron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-13T14:24:49Z","updated_at":"2015-08-13T19:31:47Z","closed_at":null,"body":"Hello!\r\n\r\nI'm having a hard time determining why my calls to scrollToElement sometimes work and sometimes don't.  My slimmed down code looks like this ('page' is a var I've confirmed refers to an ID in the DOM, located via \"angular.element(...)\"):\r\n\r\nmyViewerDiv.scrollToElement(page, 10, 2000, myEasingFunction).then(function () {\r\n    $log.debug('scrollToElement page \"' + page[0].id + '\" succeeded');\r\n}, function(reason) {\r\n    $log.debug('scrollToElement page \"' + page[0].id + '\" failed: ' + reason);\r\n});\r\n\r\nWhen \"function() {...}\" is called, the element I'm trying to scroll to does in fact scroll into view.  When the second function is called, reason is undefined (which is fine if in fact no reason is provided) and the element I'm after in the DOM is not scrolled into view.\r\n\r\nNOTE: I am attempting to scroll to a DIV within another DIV marked as overflow: scroll, but I AM using du-scroll-container per your documentation.\r\n\r\nAny idea why it works sometimes and not others??  I'm currently using version 0.6.4.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/oblador/angular-scroll/issues/comments/130813072","html_url":"https://github.com/oblador/angular-scroll/issues/140#issuecomment-130813072","issue_url":"https://api.github.com/repos/oblador/angular-scroll/issues/140","id":130813072,"user":{"login":"edamron","id":5248193,"avatar_url":"https://avatars.githubusercontent.com/u/5248193?v=3","gravatar_id":"","url":"https://api.github.com/users/edamron","html_url":"https://github.com/edamron","followers_url":"https://api.github.com/users/edamron/followers","following_url":"https://api.github.com/users/edamron/following{/other_user}","gists_url":"https://api.github.com/users/edamron/gists{/gist_id}","starred_url":"https://api.github.com/users/edamron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edamron/subscriptions","organizations_url":"https://api.github.com/users/edamron/orgs","repos_url":"https://api.github.com/users/edamron/repos","events_url":"https://api.github.com/users/edamron/events{/privacy}","received_events_url":"https://api.github.com/users/edamron/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T19:31:47Z","updated_at":"2015-08-13T19:31:47Z","body":"Hmmm...just noticed something that may allow me to move on without figuring this out...\r\n\r\nMy page is basically laid out with a repeat over an array of documents, with each page image being placed into an IMG tag.  Right next to the array of page images is a bootstrap accordion, with page thumbnails that can be clicked on to 'angular-scroll' down to the appropriate full-size page image.\r\n\r\nAs the large images scroll, I also have events that fire which cause the accordion thumbnails to scroll.  This functionality is used to keep the accordion in sync with the user, should they choose to simply scroll down through the list of full-sized page images with their mouse wheel (or trackpad on a Mac).\r\n\r\nI have one call to scrollToElement inside the \".then\" of the other one.  I thought the main scroll would be completely done before entering the \".then\", but perhaps not.  Perhaps THAT is the other scroll going on at the same time that's causing the other one to stop??\r\n\r\nThanks!"}}