tomkp / react-split-pane

React split-pane component
https://tomkp.github.io/react-split-pane
MIT License
3.23k stars 408 forks source link

Adding 'padding: 10px' to .Pane class will break resize functionality. #55

Open machaj opened 8 years ago

machaj commented 8 years ago

Hi, you can reproduce this error by adding class

.Pane {
    padding: 10px;   
}

to example in index.html. Then try to resize Pane by dragging Resizer.

Resizer will be moved to the left for default SplitPane and to the right for SplitPane with prop primary="second"

Jan

tomkp commented 8 years ago

Do you need to add padding to the actual Pane? Would it be preferable to add it to the component within the Pane?

machaj commented 8 years ago

Hi, I actually don't need to add padding to the Pane. I was just experimenting with SplitPane component after commit 350ba3f, because I need scrollbars in my Panes.

So I put a random long content to Pane and add overflow: auto and padding: 10px to .Pane css class which is newly available. Then I hit this bug.

I guess, that somebody else will add padding to .Pane class too :-)

Jan

tomkp commented 8 years ago

I'd be happy to accept any PR that helps with this...