Bttstrp / bootstrap-switch

Turn checkboxes and radio buttons in toggle switches.
MIT License
5.08k stars 1.44k forks source link

Fix typo. Fixes #683 #700

Closed asankov closed 3 years ago

asankov commented 5 years ago

Apparently, this typo leads to a bug with the select button - it is ON, but displayed as OFF, because it is unable to iterate through the classes that muse be set

padosuperstar commented 5 years ago

I also have this problem and this fix helped me. Merge please! Thanks a lot

LostCrew commented 5 years ago

@asankov Please reflect changes to source code: https://github.com/Bttstrp/bootstrap-switch/blob/master/CONTRIBUTING.md

atodorov commented 5 years ago

@LostCrew in sources is this what is needed

- function prvcontainerPosition(state = this.ope) {
+ function prvcontainerPosition(state = this.options.state) {

The existing test suite didn't catch this so I guess we need a test as well.

asankov commented 5 years ago

@LostCrew thanks for pointing me to the contribution guidelines. I haven't contributed to a js library before, so I am not familiar with the build process, etc.

I updated my PR accordingly, can you take a look at it again?

asankov commented 5 years ago

@LostCrew ping. can you take a look at this? It looks like a lot of people would benefit of merging this PR?