Bug: Mobile sidebar breaks if opened during initialization #4893
Labels
Status: Needs Review
This issue/PR needs an initial or additional review
Type: Bug
Involves something that isn't working as intended
Checks
Bug: brief description of bug
format, e.g.Bug: Lesson complete button does not update on click
Bug description
If the hamburger menu icon is clicked too soon after navigation, the sidebar component can't be opened until the page is refreshed. This happens even if the page appears to be fully loaded (after progress bar/spinner is gone from browser).
Reproduced on Chrome (Android) and Chrome/Safari (Mac)
How to reproduce
Navigate to any page at screen width < 768px and click the hamburger menu icon during page load or soon after the browser appears to have finished loading.
Expected behavior
The button should be disabled until the component is initialized.
What browsers are you seeing the problem on?
Chrome
What OS are you using?
MacOS
Discord Name
columk
Additional Comments
I wonder would adding a check in
open_modal_controller.js
to see if the controller is ready before callingthis.visibilityOutlet.on()
would solve it.Otherwise the button could be initialized with a
disabled
attribute which could then be removed in the controller's connect function.The text was updated successfully, but these errors were encountered: