1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-11-03 02:13:16 +03:00

Fixed firefox tri-layout grid issue and added tablet sticky sidebar

- Fixed issue with original left-sidebar content being placed halfway
down the page.
- Added sticky sidebar to mid-size tablet layout, only for original left
sidebar items.

Fixes #1434.
This commit is contained in:
Dan Brown
2019-06-16 12:46:23 +01:00
parent f08668706f
commit bf1371d04c
3 changed files with 22 additions and 10 deletions

View File

@@ -23,8 +23,11 @@ class PageDisplay {
const sidebarPageNav = document.querySelector('.sidebar-page-nav');
if (sidebarPageNav) {
DOM.onChildEvent(sidebarPageNav, 'a', 'click', (event, child) => {
event.preventDefault();
window.components['tri-layout'][0].showContent();
this.goToText(child.getAttribute('href').substr(1));
const contentId = child.getAttribute('href').substr(1);
this.goToText(contentId);
window.history.pushState(null, null, '#' + contentId);
});
}
}