andreruffert / rangeslider.js

🎚 HTML5 input range slider element jQuery polyfill
https://rangeslider.js.org
MIT License
2.16k stars 401 forks source link

Container styles are broken #112

Closed anseki closed 9 years ago

anseki commented 9 years ago

Hi, thanks for your plugin.

I put the range element into the div element. The styles (overflow etc.) of this element are controlled by the other code. Then, those styles are broken when rangeslider is initialized. The display property seems to be saved before getting size, and it is restored later. https://github.com/andreruffert/rangeslider.js/blob/develop/src/rangeslider.js#L126 But, other properties are not. These properties which were set by the other code are cleared all.

andreruffert commented 9 years ago

@anseki a CodePen etc. would be helpful!

anseki commented 9 years ago

Ok. Just 2 cases are here. http://jsfiddle.net/wjLcx04n/

Case 1: Click "init 1" button.

Case 2: Click "collapse" button, and click "init 2" button.

CSS properties height, overflow, and visibility are broken. Those inline-styles are overwritten to ''.