{"action":"closed","issue":{"url":"https://api.github.com/repos/atom/atom/issues/18320","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/18320/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/18320/comments","events_url":"https://api.github.com/repos/atom/atom/issues/18320/events","html_url":"https://github.com/atom/atom/issues/18320","id":373707308,"node_id":"MDU6SXNzdWUzNzM3MDczMDg=","number":18320,"title":"Unstyled Scrollbars When Plugging in Mice","user":{"login":"matthewwithanm","id":126263,"node_id":"MDQ6VXNlcjEyNjI2Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/126263?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewwithanm","html_url":"https://github.com/matthewwithanm","followers_url":"https://api.github.com/users/matthewwithanm/followers","following_url":"https://api.github.com/users/matthewwithanm/following{/other_user}","gists_url":"https://api.github.com/users/matthewwithanm/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewwithanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewwithanm/subscriptions","organizations_url":"https://api.github.com/users/matthewwithanm/orgs","repos_url":"https://api.github.com/users/matthewwithanm/repos","events_url":"https://api.github.com/users/matthewwithanm/events{/privacy}","received_events_url":"https://api.github.com/users/matthewwithanm/received_events","type":"User","site_admin":false},"labels":[{"id":98444358,"node_id":"MDU6TGFiZWw5ODQ0NDM1OA==","url":"https://api.github.com/repos/atom/atom/labels/more-information-needed","name":"more-information-needed","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-24T22:49:42Z","updated_at":"2018-11-26T22:57:49Z","closed_at":"2018-11-26T22:57:49Z","author_association":"MEMBER","body":"### Prerequisites\r\n\r\n* [x] Put an X between the brackets on this line if you have done all of the following:\r\n    * Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode\r\n    * Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/\r\n    * Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq\r\n    * Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom\r\n    * Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages\r\n\r\n### Description\r\n\r\nIn some situations, `scrollbar-style` doesn't notice changes to (or report correct values for) `preferredScrollStyle`.\r\n\r\nRelated: #15350\r\n\r\ncc @hansonw \r\n\r\n### Steps to Reproduce\r\n\r\n1. Have Magic Mouse active on my computer.\r\n2. Plug in Logitech M500 (I think?) mouse.\r\n3. Turn off Magic Mouse.\r\n\r\n**Expected behavior:** [What you expect to happen]\r\n\r\nThe \"scrollbars-visible-always\" class is added to the workspace element.\r\n\r\n**Actual behavior:** [What actually happens]\r\n\r\nIt's not.\r\n\r\n**Reproduces how often:** [What percentage of the time does it reproduce?]\r\n\r\n100% with these repro steps.\r\n\r\n### Versions\r\n\r\nMacOS 10.13.6 (High Sierra)\r\n\r\n```\r\n$ atom --version\r\nAtom    : 1.31.1\r\nElectron: 2.0.7\r\nChrome  : 61.0.3163.100\r\nNode    : 8.9.3\r\n$ apm --version\r\napm  2.1.1\r\nnpm  6.2.0\r\nnode 8.9.3 x64\r\natom 1.31.1\r\npython 2.7.10\r\ngit 2.13.5\r\n```\r\n\r\n### Additional Information\r\n\r\nIt turns out that if you do the observation from the main process instead, it *does* get the correct values! In other words:\r\n\r\n```js\r\nconst scrollbarStyle = require('scrollbar-style');\r\nconst remoteScrollbarStyle = require('electron').remote.require('scrollbar-style');\r\nassert(scrollbarStyle.getPreferredScrollbarStyle() === remoteScrollbarStyle.getPreferredScrollbarStyle()) // throws!\r\n```\r\n\r\nUsing `remote.require()` is [the workaround we'll be using in Nuclide][3] until this is fixed in core. It's worth noting, though, that because of [Chromium Bug 454346][1] (which was fixed in Chromium 62—Atom 1.32 uses Chromium 61), this isn't sufficient for a complete fix. The scrollable elements must also be forcefully redrawn. See [this commit][2] for more details.\r\n\r\n[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=454346\r\n[2]: https://github.com/facebook/nuclide/commit/0a860a29acfa7ee4294907b92c658aa88b3be92e\r\n[3]: https://github.com/facebook/nuclide/tree/c3166db75e234e1fcee9df2476afeb392bc16806/pkg/nuclide-scrollbar-style-fix"}}
{"actor":{"display_login":"no-response"}}