Fix js bug.
This commit is contained in:
parent
f58a88b883
commit
1782dd0f1f
|
@ -764,8 +764,9 @@ function transdate(){
|
|||
}
|
||||
var _this = $(document.activeElement);//$(this);
|
||||
if($('body').css('position') != 'fixed' && !_this.hasClass('close-screen-btn') && !_this.hasClass('navbar-toggle')){
|
||||
var ele_offset = _this[0].getBoundingClientRect().top - window.top_barrier_height;
|
||||
console.log(_this, ele_offset)
|
||||
var ele_offset = _this[0].getBoundingClientRect().top;
|
||||
if(ele_offset.parents('.kenjohn.navFixed').length == 0)
|
||||
ele_offset -= window.top_barrier_height;
|
||||
if(ele_offset < 0){
|
||||
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
||||
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
||||
|
|
Loading…
Reference in New Issue