jamesflorentino / nanoScrollerJS

A jQuery plugin that offers a simplistic way of implementing Lion OS scrollbars.
http://jamesflorentino.github.com/nanoScrollerJS/
MIT License
2.69k stars 503 forks source link

content move/pan right when highlight #162

Open drhanlau opened 11 years ago

drhanlau commented 11 years ago

I understood that this is how nanoScroller works but when we try to highlight content in nanoScroller content in moves to the right and misalign, is there a solution for this problem?

image

kristerkari commented 11 years ago

Thanks for reporting, need to see if this can be fixed.

kristerkari commented 11 years ago

Looks like this is something that Chrome should fix: http://code.google.com/p/chromium/issues/detail?id=116655

Dkra commented 11 years ago

Fixed this issue like fb, content rebounded to its original position. Hope this could help you :) add the code to your nanoscroller.js :

461 this.$content.bind("" + SCROLL + " " + MOUSEWHEEL + " " + DOMSCROLL + " " + TOUCHMOVE, events [SCROLL]);


   var dragging=false;
   this.$content.bind("mousedown",function(e){
     dragging=true;
   });
   this.$content.bind("mouseleave",function(e){
     var $content=$(this);
     if(dragging==true){
         $(document).unbind("mouseup.nanoScroll").bind("mouseup.nanoScroll",function(e){
           dragging=false;
           $('.content').css('right',0);
           $content.scrollLeft(0);
           $('.content').css('right',-17);
           $(document).unbind("mouseup.nanoScroll");
         });
     }
   });
 };

480 /** 481 Removes event listeners with jQuery. 482 @method removeEvents 483 @private

kristerkari commented 11 years ago

@dkra4741 Thanks, I'll have a look at your solution.

luishdez commented 10 years ago

Any news on this ? Thanks!