{"action":"created","issue":{"url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/33","repository_url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar","labels_url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/33/comments","events_url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/33/events","html_url":"https://github.com/noeldelgado/gemini-scrollbar/pull/33","id":167705753,"number":33,"title":"remove / separeted _viewElement","user":{"login":"noeldelgado","id":895846,"avatar_url":"https://avatars.githubusercontent.com/u/895846?v=3","gravatar_id":"","url":"https://api.github.com/users/noeldelgado","html_url":"https://github.com/noeldelgado","followers_url":"https://api.github.com/users/noeldelgado/followers","following_url":"https://api.github.com/users/noeldelgado/following{/other_user}","gists_url":"https://api.github.com/users/noeldelgado/gists{/gist_id}","starred_url":"https://api.github.com/users/noeldelgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noeldelgado/subscriptions","organizations_url":"https://api.github.com/users/noeldelgado/orgs","repos_url":"https://api.github.com/users/noeldelgado/repos","events_url":"https://api.github.com/users/noeldelgado/events{/privacy}","received_events_url":"https://api.github.com/users/noeldelgado/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T20:38:06Z","updated_at":"2016-07-27T09:46:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/pulls/33","html_url":"https://github.com/noeldelgado/gemini-scrollbar/pull/33","diff_url":"https://github.com/noeldelgado/gemini-scrollbar/pull/33.diff","patch_url":"https://github.com/noeldelgado/gemini-scrollbar/pull/33.patch"},"body":"When native scrollbars are supported and an `onResize` callback is passed, we need to create the resize trigger object for the event to be fired but we do not need to create a separeted `_viewElement`.\r\n\r\nThe way gemini works is that it will use the native scrollbars if the OS supports “overlay-scrollbars” (which means that the `element` you pass on the configuration should be scrollable by default `overflow: auto|scroll`)."},"comment":{"url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/comments/235538767","html_url":"https://github.com/noeldelgado/gemini-scrollbar/pull/33#issuecomment-235538767","issue_url":"https://api.github.com/repos/noeldelgado/gemini-scrollbar/issues/33","id":235538767,"user":{"login":"richvdh","id":1389908,"avatar_url":"https://avatars.githubusercontent.com/u/1389908?v=3","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T09:46:08Z","updated_at":"2016-07-27T09:46:08Z","body":"@noeldelgado: it's hard for me to test this, because my OS doesn't support overlay-scrollbars, but my thinking is as follows:\r\n\r\n`onResize` is supposed to be called when the external size (`offsetWidth`/`offsetHeight`) of the div changes. However, if you put the resize-trigger inside the div, then it will match the *internal* size (`scrollWidth`/`scrollHeight`) of the div. I think you won't see this on your example, because the internal and external size of `#example-7` are always the same.\r\n\r\nSo even if the OS supports native scrollbars, you need an outer div which doesn't scroll, which contains both the resize-trigger and the `viewElement` which does the scrolling.\r\n\r\nI guess the inner `viewElement` could use the native scroll behaviour if `DONT_CREATE_GEMINI` is false. I think I made it use the gemini scrollbar in this case because it was easier for me to get right without being able to test on OS X.\r\n\r\n(In fact, as things are here, the resize-trigger won't match the size at all, because the `width==height==100%` trick only works if the parent has `position: relative`, but that is probably solved more easily.)"}}
{"actor":{"display_login":"richvdh"}}