Rangeinput vertical click position wrong calculated #463

Closed
johannes85 opened this Issue Aug 23, 2011 · 1 comment

Projects

None yet

2 participants

@johannes85
// clicking
root.click(function(e) { 
    if (input.is(":disabled") || e.target == handle[0]) { 
        return e.preventDefault(); 
    }                 
    init(); 
    var fix = handle.width() / 2;   
    slide(e, vertical ? len-origo-fix + e.pageY  : e.pageX -origo -fix);  
});

should be

// clicking
root.click(function(e) { 
    if (input.is(":disabled") || e.target == handle[0]) { 
        return e.preventDefault(); 
    }                 
    init(); 
    if (vertical) {
        var fix = handle.height() / 2;  
    }else{
        var fix = handle.width() / 2;  
    }
    slide(e, vertical ? len-origo-fix + e.pageY  : e.pageX -origo -fix);  
});
@bradrobertson
Contributor

fixed in dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment