Skip to content

IE issue with NaN on parseFloat($correctionParent.css('border-top-width')) #30

@metadan

Description

@metadan

I've integrated quicksand into a site i'm working on and came across this issue...

I've fixed it but how do i submit a fix to the code (if my fix is ok, and it is deemed a bug that is ofcourse)?

Regards,
Dan

BASE:
correctionOffset.top -= parseFloat($correctionParent.css('border-top-width'));
correctionOffset.left -= parseFloat($correctionParent.css('border-left-width'));

FIX:
var bTopWidth = parseFloat($correctionParent.css('border-top-width'));
if ( !isNaN(bTopWidth) ) {
correctionOffset.top -= bTopWidth;
}
var bLeftWidth = parseFloat($correctionParent.css('border-left-width'));
if ( !isNaN(bLeftWidth) ) {
correctionOffset.left -= bLeftWidth;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions