wieringen / tinyscrollbar

A lightweight cross browser javascript scrollbar.
http://baijs.com/tinyscrollbar
Other
398 stars 202 forks source link

Laptops with touchscreens fail #64

Closed patstuart closed 8 years ago

patstuart commented 8 years ago

Chrome browser supports touch events for laptops with touchscreens, meaning such users are no longer able to navigate with the mouse due to this code:

if(hasTouchEvents) {
    $viewport[0].ontouchstart = function(event) {
        if(1 === event.touches.length) {
            event.stopPropagation();

            _start(event.touches[0]);
        }
    };
}
else {
    $thumb.bind("mousedown", function(event){
        event.stopPropagation();
        _start(event);
    });
    $track.bind("mousedown", function(event){
        _start(event, true);
    });
}
patstuart commented 8 years ago

Duplicate