nrako / react-component-resizable

A React component to implement cross-browser event based resize detection
MIT License
70 stars 16 forks source link

Scrollbars on Mac #11

Closed sverrejoh closed 9 years ago

sverrejoh commented 9 years ago

I haven't made a clean test case yet, but I have a case where the overflow: auto rules on the resize triggers, causes scrollbars in Chrome on Mac.

.resize-triggers > div {
  overflow: auto;
}

If I change this to overflow: hidden, then the scrollbars disappear, and the component still works like it should.

Is there any reason to use overflow: auto here? Does this break in other browsers than Chrome?

sverrejoh commented 9 years ago

This simple change fixes the issue for me: https://github.com/sverrejoh/react-component-resizable/commit/5d24a4e218209874dea4a7895eb6cf7263ee238c

nrako commented 9 years ago

@sverrejoh I don't remember all the inter-working of this, but I'm pretty it's (or was) needed to have a proper cross browser resize event detection.

The implemented solution is based on this blog post at this date https://web.archive.org/web/20140920220605/http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/

Apparently the author came with a new approach which I have to evaluate: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/

I might address this more seriously when I'll make a release for react 0.14 (ref #10).