{"action":"created","issue":{"url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/140","repository_url":"https://api.github.com/repos/gromo/jquery.scrollbar","labels_url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/140/comments","events_url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/140/events","html_url":"https://github.com/gromo/jquery.scrollbar/issues/140","id":249046117,"number":140,"title":"\"too much recursion\" in Firefox with two scrollable elements at a time","user":{"login":"rgozdzialski","id":5881073,"avatar_url":"https://avatars3.githubusercontent.com/u/5881073?v=4","gravatar_id":"","url":"https://api.github.com/users/rgozdzialski","html_url":"https://github.com/rgozdzialski","followers_url":"https://api.github.com/users/rgozdzialski/followers","following_url":"https://api.github.com/users/rgozdzialski/following{/other_user}","gists_url":"https://api.github.com/users/rgozdzialski/gists{/gist_id}","starred_url":"https://api.github.com/users/rgozdzialski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgozdzialski/subscriptions","organizations_url":"https://api.github.com/users/rgozdzialski/orgs","repos_url":"https://api.github.com/users/rgozdzialski/repos","events_url":"https://api.github.com/users/rgozdzialski/events{/privacy}","received_events_url":"https://api.github.com/users/rgozdzialski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-09T14:17:03Z","updated_at":"2017-08-09T15:40:05Z","closed_at":null,"body":"I have 2 containers on which I use the jquery.scrollbar plugin:\r\n\r\nHTML\r\n\r\n```\r\n<div class=\"scrollbar-inner contaner-one\">...</div>\r\n<div class=\"scrollbar-inner contaner-two\">...</div>\r\n```\r\n\r\nJS\r\n\r\n```\r\n$(function() {\r\n    // some code skipped....\r\n    $('.scrollbar-inner').scrollbar(); // all the default are used\r\n});\r\n```\r\n\r\nThe containers are hidden at first. When they are shown, their height is manually set. Then I initialize the `.scrollbar()` on each. All happens on DOM ready.\r\n\r\nChrome and Safari don't see the problem, but Firefox chokes and throws **too much recursion** error. If I remove the JS line, all is OK. Well, all is OK, but I have no scrollbars ;)\r\n\r\nThe error thrown in FF is linked to the `_updateScroll` [function](https://github.com/gromo/jquery.scrollbar/blob/master/jquery.scrollbar.js#L591) in your plugin. Apparently, the function [calls itself](https://github.com/gromo/jquery.scrollbar/blob/master/jquery.scrollbar.js#L645) when specific conditions are met.\r\n\r\nI get that I have more JS in place, but no other `.scrollbar()` instance is created on the page in question. Do you have any ideas why the `_updateScroll` function would be called in an infinite loop when using the plugin? Or why only Firefox would have this problem?\r\n\r\n(Of course, it may be that the other browsers simply handle the recursion issue differently.)"},"comment":{"url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/comments/321294265","html_url":"https://github.com/gromo/jquery.scrollbar/issues/140#issuecomment-321294265","issue_url":"https://api.github.com/repos/gromo/jquery.scrollbar/issues/140","id":321294265,"user":{"login":"gromo","id":307429,"avatar_url":"https://avatars0.githubusercontent.com/u/307429?v=4","gravatar_id":"","url":"https://api.github.com/users/gromo","html_url":"https://github.com/gromo","followers_url":"https://api.github.com/users/gromo/followers","following_url":"https://api.github.com/users/gromo/following{/other_user}","gists_url":"https://api.github.com/users/gromo/gists{/gist_id}","starred_url":"https://api.github.com/users/gromo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gromo/subscriptions","organizations_url":"https://api.github.com/users/gromo/orgs","repos_url":"https://api.github.com/users/gromo/repos","events_url":"https://api.github.com/users/gromo/events{/privacy}","received_events_url":"https://api.github.com/users/gromo/received_events","type":"User","site_admin":false},"created_at":"2017-08-09T15:40:05Z","updated_at":"2017-08-09T15:40:05Z","body":"It may happen if styles are continuing changing when container's size is calculated (after applying custom scrollbar styles). So it depends on your styles - you can try to create example with this bug on jsFiddle.net with minimum possible JS/CSS/HTML code"}}
{"actor":{"display_login":"gromo"}}