Hamburger menu button doesn't open collapsed chat / deepchat
I'm using Drupal 10.6.x with Drupal AI Core 1.3.6. It would be great if this were applied to the Drupal 10 branch, in addition to Drupal 11.
Clicking the chat label correctly opens up a collapsed chat. Clicking the hamburger menu icon does not open the collapsed chat. It only attempts to show the dropdown menu, but it's not visible if the chat is collapsed.
Suggested behavior: Clicking the hamburger icon should open the chat first, then show the dropdown menu, or at least open the chat.
In _/ai/modules/ai_chatbot/js/toolbar-chatbot.js_:
`const toggleMenu = (event) => { // Don't run parent event event.stopPropagation(); // Toggle it $dropdownMenu.classList.toggle('active'); }`
`$menuButton.addEventListener('click', toggleMenu)`
Suggested fix:
`const toggleMenu = (event) => { event.stopPropagation(); // Open the chat if it's collapsed if (!document.body.classList.contains('ai-chatbot-opened')) { toggleChatbot(); } // Then toggle the menu $dropdownMenu.classList.toggle('active'); }`
issue