Safari - Always show safari native bar regardless scroll up or down

0 votes
195 views
added Jun 24, 2019 in Software & tools by LC Marshal Captain (25,790 points)
// JS - Only show for specific elements
$(document).ready(function() {
  if ($('body.page-content').length) {
    $('html').css({'height': '100%', 'overflow': 'hidden'});
    $('body').addClass('show-safari-bar');
  }
});

 

//CSS - Style for body
.show-safari-bar {
    @media (max-width: $break_m_xx) {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: scroll;
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...