Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Doesn't work inside a display: none !important container #188

Merged
merged 1 commit into from
Nov 29, 2015

Conversation

ge0ffray
Copy link
Contributor

Rangeslider doesn't work if it is initialized inside a hidden container where display: none has been forced with an !important declaration. This way to hide elements is used by Bootstrap, HTML5 Boilerplate, ...

.hidden {
  display: none !important;
}
<div class="hidden">
  <input type="range" />
</div>

This is because hiddenParentNodes[i].style.display = 'block' doesn't override class level important style. My fix correct this problem.

Rangeslider doesn't work if it is initialized inside a hidden container where display: none has been forced with an **!important** declaration. This way to hide elements is used by Bootstrap, HTML5 Boilerplate, ...

```css
.hidden {
  display: none !important;
}
```
```html
<div class="hidden"">
  <input type="range" />
</div>
```
This is because hiddenParentNodes[i].style.display = 'block' doesn't override important style. My fix correct this problem.
andreruffert added a commit that referenced this pull request Nov 29, 2015
Doesn't work inside a display: none !important container
@andreruffert andreruffert merged commit 6f558ee into andreruffert:develop Nov 29, 2015
@andreruffert
Copy link
Owner

@gwarnants thanks! 😊:v:

@andreruffert andreruffert added this to the Release v2.0.5 milestone Nov 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants