Fix bug.
This commit is contained in:
parent
ed254c1792
commit
c409eab1db
|
@ -11,6 +11,11 @@
|
||||||
this.replaceWith(new_html);
|
this.replaceWith(new_html);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
try{
|
||||||
|
var isMobile = (window.matchMedia ? window.matchMedia("(any-pointer:coarse)").matches : ("ontouchstart" in document.documentElement));
|
||||||
|
}catch(e){
|
||||||
|
var isMobile = false;
|
||||||
|
}
|
||||||
function fix_first_element(force_fix) {
|
function fix_first_element(force_fix) {
|
||||||
if(!force_fix && window.already_fix_first_element){
|
if(!force_fix && window.already_fix_first_element){
|
||||||
return;
|
return;
|
||||||
|
@ -706,33 +711,35 @@ function transdate(){
|
||||||
window.temp_scrollY = document.documentElement.scrollTop;
|
window.temp_scrollY = document.documentElement.scrollTop;
|
||||||
window.temp_scrollX = document.documentElement.scrollLeft;
|
window.temp_scrollX = document.documentElement.scrollLeft;
|
||||||
}
|
}
|
||||||
$(document).on('focusin','*',function(event){
|
if(!isMobile){
|
||||||
// event.stopPropagation();
|
$(document).on('focusin','*',function(event){
|
||||||
if(window.focus_timeout_id){
|
// event.stopPropagation();
|
||||||
window.clearTimeout(window.focus_timeout_id);
|
if(window.focus_timeout_id){
|
||||||
}
|
window.clearTimeout(window.focus_timeout_id);
|
||||||
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;
|
|
||||||
if(_this.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);
|
|
||||||
}
|
}
|
||||||
window.focus_timeout_id = window.setTimeout(function(){
|
var _this = $(document.activeElement);//$(this);
|
||||||
var ele_offset = _this[0].getBoundingClientRect().top - window.top_barrier_height;
|
if($('body').css('position') != 'fixed' && !_this.hasClass('close-screen-btn') && !_this.hasClass('navbar-toggle')){
|
||||||
|
var ele_offset = _this[0].getBoundingClientRect().top;
|
||||||
|
if(_this.parents('.kenjohn.navFixed').length == 0)
|
||||||
|
ele_offset -= window.top_barrier_height;
|
||||||
if(ele_offset < 0){
|
if(ele_offset < 0){
|
||||||
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
||||||
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
||||||
}
|
}
|
||||||
}, 800);
|
window.focus_timeout_id = window.setTimeout(function(){
|
||||||
if ($('header>.kenjohn').attr('class') == "kenjohn" && _this.is('a.orbit-bar-logo')){
|
var ele_offset = _this[0].getBoundingClientRect().top - window.top_barrier_height;
|
||||||
$('header>.kenjohn').addClass('navRel');
|
if(ele_offset < 0){
|
||||||
$('#gotocenter').focus();
|
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
||||||
|
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
||||||
|
}
|
||||||
|
}, 800);
|
||||||
|
if ($('header>.kenjohn').attr('class') == "kenjohn" && _this.is('a.orbit-bar-logo')){
|
||||||
|
$('header>.kenjohn').addClass('navRel');
|
||||||
|
$('#gotocenter').focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
$('.group').each(function(){
|
$('.group').each(function(){
|
||||||
if ($(this).text().trim()==''){
|
if ($(this).text().trim()==''){
|
||||||
$(this).css('padding',0);
|
$(this).css('padding',0);
|
||||||
|
|
|
@ -147,12 +147,18 @@ body{
|
||||||
.w-ba-banner{
|
.w-ba-banner{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
|
align-items: center;
|
||||||
.w-ba-banner__wrap{
|
.w-ba-banner__wrap{
|
||||||
flex: 0 0 65%;
|
flex: 0 0 65%;
|
||||||
}
|
}
|
||||||
.ad-overlay{
|
.ad-overlay{
|
||||||
position: relative;
|
position: relative;
|
||||||
background: none;
|
background: none;
|
||||||
|
width: 35%;
|
||||||
|
p{
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue