{"action":"created","issue":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/13479","repository_url":"https://api.github.com/repos/mui-org/material-ui","labels_url":"https://api.github.com/repos/mui-org/material-ui/issues/13479/labels{/name}","comments_url":"https://api.github.com/repos/mui-org/material-ui/issues/13479/comments","events_url":"https://api.github.com/repos/mui-org/material-ui/issues/13479/events","html_url":"https://github.com/mui-org/material-ui/pull/13479","id":376247203,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NTA4Mjg1","number":13479,"title":"[Slider] Fix sticky slider when mousing off the window then back in","user":{"login":"gkjohnson","id":734200,"node_id":"MDQ6VXNlcjczNDIwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/734200?v=4","gravatar_id":"","url":"https://api.github.com/users/gkjohnson","html_url":"https://github.com/gkjohnson","followers_url":"https://api.github.com/users/gkjohnson/followers","following_url":"https://api.github.com/users/gkjohnson/following{/other_user}","gists_url":"https://api.github.com/users/gkjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/gkjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkjohnson/subscriptions","organizations_url":"https://api.github.com/users/gkjohnson/orgs","repos_url":"https://api.github.com/users/gkjohnson/repos","events_url":"https://api.github.com/users/gkjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/gkjohnson/received_events","type":"User","site_admin":false},"labels":[{"id":460200926,"node_id":"MDU6TGFiZWw0NjAyMDA5MjY=","url":"https://api.github.com/repos/mui-org/material-ui/labels/lab:%20Slider","name":"lab: Slider","color":"8ceef2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-01T04:13:25Z","updated_at":"2018-11-02T02:10:04Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mui-org/material-ui/pulls/13479","html_url":"https://github.com/mui-org/material-ui/pull/13479","diff_url":"https://github.com/mui-org/material-ui/pull/13479.diff","patch_url":"https://github.com/mui-org/material-ui/pull/13479.patch"},"body":"Fixes #13459.\r\n\r\nAdded `mouseenter` and `mouseleave` events to achieve the following behavior:\r\n- When mousing off the window the slider is moved to the extreme end instead of staying at the last-seen position of the mouse.\r\n- When the mouse re-enters the window we check if the mouse is currently pressed. If it is not then we assume it was released outside the window and end the slider interaction, fixing the slider stickiness issue.\r\n\r\nIs there a good way to demonstrate the new behavior in a codepen or anything? Otherwise the behavior can be tested in the docs pages.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/mui-org/material-ui/issues/comments/435248385","html_url":"https://github.com/mui-org/material-ui/pull/13479#issuecomment-435248385","issue_url":"https://api.github.com/repos/mui-org/material-ui/issues/13479","id":435248385,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTI0ODM4NQ==","user":{"login":"gkjohnson","id":734200,"node_id":"MDQ6VXNlcjczNDIwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/734200?v=4","gravatar_id":"","url":"https://api.github.com/users/gkjohnson","html_url":"https://github.com/gkjohnson","followers_url":"https://api.github.com/users/gkjohnson/followers","following_url":"https://api.github.com/users/gkjohnson/following{/other_user}","gists_url":"https://api.github.com/users/gkjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/gkjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkjohnson/subscriptions","organizations_url":"https://api.github.com/users/gkjohnson/orgs","repos_url":"https://api.github.com/users/gkjohnson/repos","events_url":"https://api.github.com/users/gkjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/gkjohnson/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T02:10:04Z","updated_at":"2018-11-02T02:10:04Z","author_association":"NONE","body":"> Could you add a test that simulates a mouseleave, mouseenter while clicked and mouseenter while not clicked?\r\n\r\nI'm happy to add tests but I'm having trouble creating a mouseEvent for `document.body` that includes the `pageX` and `pageY` fields we need. It looks like they aren't supported in jsdom at the moment: https://github.com/jsdom/jsdom/issues/1911. The `buttons` field also doesn't seem to be supported, either.\r\n\r\nDo you have any suggestions on how to test the events with the required fields? Other than that I've addressed the other two requested changes.\r\n\r\nThanks!"}}
{"actor":{"display_login":"gkjohnson"}}