Resolving regression caused by #393, and re-introduced original
resize handler method used by @petergood -- placing it behind
lodash .debounce should appease @pitaj's concerns, but I frankly
see no other way to have this feature but also fix cases where
the header is not at the top of the page.
main
Julian Lam 7 years ago
parent fd730df59b
commit 3f43ec1af5

@ -242,10 +242,6 @@
margin-left: -30px;
}
}
@media (min-width: @screen-md-min) {
top: 0px !important;
}
}
.breadcrumb {

@ -8,11 +8,25 @@ $(document).ready(function() {
setupEditedByIcon();
setupMobileMenu();
setupQuickReply();
configureNavbarHiding();
$(".navbar-fixed-top").autoHidingNavbar({
showOnBottom: false
require(['lodash'], function (_) {
$(window).on('resize', _.debounce(configureNavbarHiding, 200));
});
function configureNavbarHiding () {
var navbarEl = $(".navbar-fixed-top");
navbarEl.autoHidingNavbar('destroy');
navbarEl.css('top', '');
var env = utils.findBootstrapEnvironment();
if (env === 'xs' || env ==='sm') {
navbarEl.autoHidingNavbar({
showOnBottom: false,
});
}
};
function setupNProgress() {
$(window).on('action:ajaxify.start', function() {
NProgress.set(0.7);

@ -2,10 +2,10 @@
# yarn lockfile v1
pulling@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pulling/-/pulling-1.1.0.tgz#d1460833b623fedcb73c71efb4cbb6824d990749"
pulling@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/pulling/-/pulling-1.1.1.tgz#948c72ec75d76c4ff41d6cec1ef1208c8d9d18f6"
striptags@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.0.tgz#763e534338d9cf542f004a4b1eb099e32d295e44"
striptags@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd"

Loading…
Cancel
Save