From 0fd781e80aaf841c26ce59caffc579b9c391330f Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sun, 12 Oct 2025 04:21:38 +0300 Subject: [PATCH] Fix opening sidebar. Thanks to xet7 ! --- client/components/boards/boardHeader.js | 26 ++++++++++++++++-------- client/lib/attachmentMigrationManager.js | 1 + 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index ffba91259..39f5a50a3 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -81,14 +81,24 @@ BlazeComponent.extendComponent({ Modal.open('archivedBoards'); }, 'click .js-toggle-board-view': Popup.open('boardChangeView'), - // Sidebar toggle is handled by the sidebar component itself - // 'click .js-toggle-sidebar'() { - // if (Sidebar) { - // Sidebar.toggle(); - // } else { - // console.warn('Sidebar not available for toggle'); - // } - // }, + 'click .js-toggle-sidebar'() { + console.log('Hamburger menu clicked'); + // Use the same approach as keyboard shortcuts + if (typeof Sidebar !== 'undefined' && Sidebar && typeof Sidebar.toggle === 'function') { + console.log('Using Sidebar.toggle()'); + Sidebar.toggle(); + } else { + console.warn('Sidebar not available, trying alternative approach'); + // Try to trigger the sidebar through the global Blaze helper + if (typeof Blaze !== 'undefined' && Blaze._globalHelpers && Blaze._globalHelpers.Sidebar) { + const sidebar = Blaze._globalHelpers.Sidebar(); + if (sidebar && typeof sidebar.toggle === 'function') { + console.log('Using Blaze helper Sidebar.toggle()'); + sidebar.toggle(); + } + } + } + }, 'click .js-open-filter-view'() { if (Sidebar) { Sidebar.setView('filter'); diff --git a/client/lib/attachmentMigrationManager.js b/client/lib/attachmentMigrationManager.js index 2fca04644..cc2c7bc0d 100644 --- a/client/lib/attachmentMigrationManager.js +++ b/client/lib/attachmentMigrationManager.js @@ -167,3 +167,4 @@ export const attachmentMigrationManager = new AttachmentMigrationManager(); +