Skip to content

Commit

Permalink
[FIX] main navigation in iPad landscape-view (Podio bug t3kit#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmh authored and Chanpiseth09 committed Feb 6, 2017
1 parent 4fe6981 commit c402213
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dev/js/main/header/header.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =================================
// Global variables (jshint):

/*global*/
/*global touchSupport*/
// =================================

jQuery(function($) {
Expand Down Expand Up @@ -65,6 +65,12 @@ jQuery(function($) {
jQuery(function($) {
var navbar = $('.js__main-navigation');
var offsetTop = navbar.offset().top;
$(window).on('orientationchange',function() {
if ($(window).width() > 992 && touchSupport) {
var navbarPos = navbar.css('position');
offsetTop = $('header').height() - (navbarPos === 'fixed' ? 0 : navbar.outerHeight());
}
});
$(window).on('load scroll', function() {
var scrollPos = $(window).scrollTop();
if (scrollPos > offsetTop) {
Expand Down
3 changes: 3 additions & 0 deletions dev/styles/main/header/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@
-webkit-transform: translate3d(0px,0px,0px);
transform: translate3d(0px,0px,0px);
}
.touch .main-navigation-fixed .main-navigation{
z-index: 7000;
}
.main-navigation-fixed .header {
padding-bottom: @nav-height;
}
Expand Down

0 comments on commit c402213

Please sign in to comment.