Closed Zagitta closed 8 years ago
Hello and first of all thanks for the great port of iCheck to react! I've run into some issues where position: relative needed to manually be added to each css theme style like done on the example site.
After some digging it turns out this is because of an incorrect port of https://github.com/fronteed/icheck/blob/cf738c22bd543f99cdf76febb207371b1be8f611/icheck.js#L186 which uses jquery's css() function that under the hood calls getComputedStyle, style.position will only have a value in case it's set directly which as far as I can tell will never happen.
css()
getComputedStyle
style.position
I've removed the unneeded position: relative from the demo site and fixed the issue in this
Thanks for this! Would love to see it merged @luqin :+1:
Excellent thanks a lot, if I also could get you to publish it on NPM I'd be very greatful :smile:
OK
Hello and first of all thanks for the great port of iCheck to react! I've run into some issues where position: relative needed to manually be added to each css theme style like done on the example site.
After some digging it turns out this is because of an incorrect port of https://github.com/fronteed/icheck/blob/cf738c22bd543f99cdf76febb207371b1be8f611/icheck.js#L186 which uses jquery's
css()
function that under the hood callsgetComputedStyle
,style.position
will only have a value in case it's set directly which as far as I can tell will never happen.I've removed the unneeded position: relative from the demo site and fixed the issue in this