Insight-Developers-Group / BCI4KidsMediapipe

7 stars 2 forks source link

Primary menu only opens/closes when clicking directly on menu icon lines #195

Closed Dylan-Wheeler closed 2 years ago

PriyavartRajain commented 2 years ago

Yes, that's correct, you can only open the menu when you click on the lines, same goes for when you want to close it, the reason I implemented it this way is because once the menu is open, the white background of the 3 lines (of the hamburger button) expands and forms the rectangular background of the menu itself. The issue with being able to click around the 3 lines is that once the background expands behind the menu, if the user clicks anywhere except the list items, the menu will close, which can be problematic for the users. Just being able to click on the lines to close the menu solves this problem. One other way to deal with this could be to have a transparent div behind the lines, the width and height of this div would be slightly more than the button itself, and we can register clicks on this transparent div instead of just the lines.

Dylan-Wheeler commented 2 years ago

Yeah the reasoning behind this makes total sense, just marked it as a bug since we'll probably want to fix this later for a better user experience