fix: set up menu and taskbar in hook call instead of window event

main
Julian Lam 3 years ago
parent 3023c2f180
commit dbb72ba5e3

@ -10,13 +10,14 @@ $(document).ready(function () {
$(window).on('resize', utils.debounce(configureNavbarHiding, 200));
$(window).on('resize', updatePanelOffset);
$(window).on('action:app.load', function () {
setupTaskbar();
setupMobileMenu();
require(['hooks'], (hooks) => {
hooks.on('action:app.load', () => {
setupTaskbar();
setupMobileMenu();
});
});
function updatePanelOffset() {
var env = utils.findBootstrapEnvironment();
const headerEl = document.getElementById('header-menu');
if (!headerEl) {

Loading…
Cancel
Save