2012-07-30 4 views
0

jScrollpane으로 전체 화면 스크롤 webste를 만들었습니다. 모두 잘 작동하지만, 외부 링크로 스크롤하고 브라우저 창에서 다른 창으로 변경하려고하면 다시 돌아올 때 그것, jscrollpane 초기 위치로 돌아갑니다! 뭐가 잘못 됐는지 모르겠지만 여기 어떻게 만들었지, maintainPosition이 내 문제를 해결하지 못했다. 포커스 액션이있는 것처럼 보이지만 나는 그것에 대해 아무것도 찾지 못했다!alt + tab 다음에 Jscrollpane 리셋하기

$(document).ready(function(){ 
    w = $(window).width(); 
    h = $(window).height(); 
    $('.fullContent').css('width', w); 
    $('.fullContent').css('height', h).find('.bg, .lente').css('height', h); 
    $('.fullContent').jScrollPane({ 
     verticalDragMinHeight: 30, 
     verticalDragMaxHeight: 30, 
     horizontalDragMinWidth: 161, 
     horizontalDragMaxWidth: 161, 
     maintainPosition: true, 
     animateScroll: true, 
     hijackInternalLinks: true 
    }).bind('jsp-scroll-x', function(event, scrollPositionX, isAtLeft, isAtRight){ 
     $('.lente').css('left', scrollPositionX*0.6); 
     //console.log('Bg = '+scrollPositionX, 'Lente = '+scrollPositionX*0.6); 
    }); 
    var throttleTimeout; 
    $(window).bind('resize', function(){ 
     w = $(window).height(); 
     h = $(window).height(); 
     $('.fullContent').css('width', w); 
     $('.fullContent').css('height', h).find('.bg, .lente').css('height', h); 
     if($.browser.msie) { 
      if(!throttleTimeout) { 
       throttleTimeout = setTimeout(function(){ 
        $('.fullContent').data('jsp').reinitialise(); 
        throttleTimeout = null; 
       },50); 
      } 
     }else{ 
      $('.fullContent').data('jsp').reinitialise(); 
     } 
    }); 
}); 

답변

1

줄 908, 함수 initFocusHandler에 주석을 달았습니다.

 function initFocusHandler() 
     {console.log(30) 
      pane.find(':input,a').unbind('focus.jsp').bind(
       'focus.jsp', 
       function(e) 
       { 
        //comment here \/ 
        //scrollToElement(e.target, false); 
       } 
      ); 
     }