mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Explicitly assign dummy scrollbars to the correct width/height
Previously, dummy scrollbars were always 15px wide/tall. This caused them to obscure the ability to click for the entire 15px region, even if the actual scrollbar was styled to be much thinner. Now we explicitly measure the size of scrollbars on mount and when the stylesheets change and set the height/width explicitly.
This commit is contained in:
@@ -4,7 +4,12 @@ React = require 'react'
|
||||
module.exports =
|
||||
ScrollbarComponent = React.createClass
|
||||
render: ->
|
||||
{visible, width, height} = @props
|
||||
{visible, measuringScrollbars, width, height} = @props
|
||||
|
||||
if measuringScrollbars
|
||||
height = 25
|
||||
width = 25
|
||||
|
||||
display = 'none' unless visible
|
||||
|
||||
div className: 'scrollbar-corner', style: {display, width, height},
|
||||
|
||||
Reference in New Issue
Block a user